Forum Discussion
DAX formula help needed
IF([Compliant %] >= 0.10 && [Compliant %] <= 0.18, "10-18%",
IF([Compliant %] >= 0.045 && [Compliant %] < 0.10, "4.5-10%",
IF([Compliant %] >= 0.02 && [Compliant %] < 0.045, "2-4.5%",
IF([Compliant %] >= 0.01 && [Compliant %] < 0.02, "1-2%",
"others"
)
)
)
)
But I am not able to get the required visual I want (range values and the ids in the required range), since the dax is always going to the y-axis and not the x-axis(in bar chart) and not going in legend(in pie chart).
- Anonymous2 years ago
Hi John2 ,
The legend only accepts entity columns/calculated columns as values.
Please try new a calculated column first:Table = SUMMARIZE ( 'patch', 'patch'[computer id], "Compliant_%", VAR compliant_count = SUM ( patch[Compliant Count] ) VAR applicable_system_count = COUNTROWS ( patch ) RETURN DIVIDE ( compliant_count, applicable_system_count, 0 ) )and new a calculated column by use [Compliance_catergory] code:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
2 Replies
- AnonymousNot applicable
Hi John2 ,
The legend only accepts entity columns/calculated columns as values.
Please try new a calculated column first:Table = SUMMARIZE ( 'patch', 'patch'[computer id], "Compliant_%", VAR compliant_count = SUM ( patch[Compliant Count] ) VAR applicable_system_count = COUNTROWS ( patch ) RETURN DIVIDE ( compliant_count, applicable_system_count, 0 ) )and new a calculated column by use [Compliance_catergory] code:
Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
- John2Frequent Visitor
It works. Thank you so much