The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, I have a Measure and it's calculating correctly, Initially I've a requirement from user to always display only one Decimal UP on a Matrix Visual. so I've used ROUNDUP([SalesAvg],1).
But the isue is in the Matrix Visual, when I drilldown there are so many scnearios value is like 0.001, 0.04, 0.07 and because Decimal as 1 in the Modeling tab, it is defaulting to 0.1 (UP) always.
But in these scenarios User wants to display 2 decimals instead of 1.
Is there a way to define number of decimals conditionally like something below.
IF( [SalesAvg] < 0.1, ROUNDUP([SalesAvg], 2)
, ROUNDUP([SalesAvg], 1 ) )
then I selected Format--> General, Decimals--> AUTO (if I select Format as 'Decimal Number' there is no AUTO option.)
But this statement is always displaying 2 decimals.
Thank you!
Solved! Go to Solution.
Hi @Anonymous ,
Don't know what is the upper level of the matrix but you should place a measure similar to the one below replacing the Column name with the lowest level:
Measure = IF ( HASONEFILTER ( 'Table'[cat2] ); FORMAT ( ROUNDUP ( [SalesAvg]; 2 ); "0.00" ); FORMAT ( ROUNDUP ( [SalesAvg]; 1 ); "0.0" ) )
This will make the 2 decimal and format with the number of decimal places you need.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
Don't know what is the upper level of the matrix but you should place a measure similar to the one below replacing the Column name with the lowest level:
Measure = IF ( HASONEFILTER ( 'Table'[cat2] ); FORMAT ( ROUNDUP ( [SalesAvg]; 2 ); "0.00" ); FORMAT ( ROUNDUP ( [SalesAvg]; 1 ); "0.0" ) )
This will make the 2 decimal and format with the number of decimal places you need.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsJoin the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
71 | |
52 | |
50 |
User | Count |
---|---|
123 | |
119 | |
76 | |
64 | |
60 |