Bar Chart is not populating for inline expression

Sharma, Ferha Jafri 0 Reputation points
2024-09-14T13:45:59.18+00:00

Hello Experts,

I have an issue in power BI , created an inline table and as "

View = {"No. of Claims","Total Premium","Total Incurred"} 

and wrote a dax expression as

Prem_Cla_Inc toggle = 
 var selected_toggle = SELECTEDVALUE(View[Value]) 
 var var_value = SWITCH(TRUE(),
selected_toggle = "Total Premium",FORMAT(CALCULATE([Sum_Premium],ALLEXCEPT(Final_Table,Final_Table[Loss_Band])),"$#,##0.00"),
selected_toggle = "Total Incurred",FORMAT([Sum_Incured],"$#,##0.00"),
selected_toggle = "No. of Claims",FORMAT([# Claims],"#,##0"),0
)
 RETURN var_value

when I am using any dimension as Client Name to use the above expression in a bar chart it is giving me blank chart as attached. Although when creating a table it is getting populated. Please help me as what I am doing wrong.

User's imageUser's image

Microsoft Q&A
Microsoft Q&A
Use this tag to share suggestions, feature requests, and bugs with the Microsoft Q&A team. The Microsoft Q&A team will evaluate your feedback on a regular basis and provide updates along the way.
807 questions
0 comments No comments
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.