The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello Experts,
I am facing an issue in power bi as I have created an inline table as
although the chart is not working as below
Not able to understand the issue.
Solved! Go to Solution.
If you use FORMAT function then your measure output would be a text value but not a numeric value. For your usecase you need to use dynamic format strings.
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Your measure expression can be :
Prem_Cla_Inc toggle =
var selected_toggle = SELECTEDVALUE(View[Value])
var var_value =
SWITCH(
TRUE(),
selected_toggle = "Total Premium", CALCULATE([Sum_Premium],ALLEXCEPT(Final_Table,Final_Table[Loss_Band])),
selected_toggle = "Total Incurred", [Sum_Incured],
selected_toggle = "No. of Claims", [# Claims],
0
)
RETURN var_value
Dynamic format string can be :
var selected_toggle = SELECTEDVALUE(View[Value])
var var_value = SWITCH(TRUE(),
selected_toggle = "Total Premium","$#,##0.00" ,
selected_toggle = "Total Incurred", "$#,##0.00" ,
selected_toggle = "No. of Claims", "#,##0"
,0
)
RETURN var_value
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|
If you use FORMAT function then your measure output would be a text value but not a numeric value. For your usecase you need to use dynamic format strings.
https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-dynamic-format-strings
Your measure expression can be :
Prem_Cla_Inc toggle =
var selected_toggle = SELECTEDVALUE(View[Value])
var var_value =
SWITCH(
TRUE(),
selected_toggle = "Total Premium", CALCULATE([Sum_Premium],ALLEXCEPT(Final_Table,Final_Table[Loss_Band])),
selected_toggle = "Total Incurred", [Sum_Incured],
selected_toggle = "No. of Claims", [# Claims],
0
)
RETURN var_value
Dynamic format string can be :
var selected_toggle = SELECTEDVALUE(View[Value])
var var_value = SWITCH(TRUE(),
selected_toggle = "Total Premium","$#,##0.00" ,
selected_toggle = "Total Incurred", "$#,##0.00" ,
selected_toggle = "No. of Claims", "#,##0"
,0
)
RETURN var_value
Need a Power BI Consultation? Hire me on Upwork
Connect on LinkedIn
|