The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I have the a column formula called RiskCategory which shows the 3 risk types, extreme, medium and high. Because these ratings are in the rows of the columns i had to use the below formula so it puts the correct data under the correct quarter. To make sure it goes to correct data i have done a switch called quarter labels which goes in the axis and then the riskcategory in the legend and yaxis. What i am having issues with is that the Medium category is not showing for Q4 2023, Q1 2024 and Q2 2024 but is showing fine for Q3 2023. ANy help will be much appreciated
Hi @biancabee12 ,
Ensure that the data for Q4 2023, Q1 2024, and Q2 2024 within the 'Risk Trend' column actually contains values that fall within the range for the "Medium" category (i.e., >= 4 and <= 6). It's possible that there might be no data points within this range for these quarters, which would result in the "Medium" category not being displayed.
Consider simplifying your DAX formula to make it easier to debug and maintain
RiskCategory =
SWITCH(
TRUE(),
AND('Risk Trend'[SelectedQuarter] >= 15, 'Risk Trend'[SelectedQuarter] <= 25), "Extreme",
AND('Risk Trend'[SelectedQuarter] >= 4, 'Risk Trend'[SelectedQuarter] <= 6), "Medium",
AND('Risk Trend'[SelectedQuarter] >= 8, 'Risk Trend'[SelectedQuarter] <= 12), "High",
BLANK()
)
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous
I can confirm that there is data within these columns. Q3 2023 shows the data for Medium but not for the other quarters when there is data for it. When i select edit query, the data is definitely there but the option is not appearing in the filter. i even created another bar graph with only Q4 2023 and then it appeared up. I added Q3 2023 and the data didnt appear up. Tried the formula you've given and still the same issue
Hi,
Share data in a format that can be pasted in an MS Excel file. Show the expected result very clearly.