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 August 31st. Request your voucher.
I am working building out a report with a stack bar chart and I am attempting to write a dax query to display the data as intended. The Data is from the NHL. I have pulled three columns as metrics into my report(they have whole number values):
1. I_F_highDangerGoals
2. I_F_mediumDangerGoals
3. I_F_lowDangerGoals
Now I am pulling those metrics into a stacked bar chart, but I do not want to show any players who have zero goals for ALL three metrics. If they have a greater than zero value for one of those three metrics, I want to display that player. I have tried multiple different queries and cannot seem to get it right. Thank you for any help you can provide!
Solved! Go to Solution.
Hello @JBussone
You may try applying below measure to the visual-level filter on your stacked bar chart and Set ' is =1'.
IF (
SUM('table'[I_F_highDangerGoals]) +
SUM('table'[I_F_mediumDangerGoals]) +
SUM('table'[I_F_lowDangerGoals]) > 0,
1,
0
)
Hope this works:)
Hello @JBussone
You may try applying below measure to the visual-level filter on your stacked bar chart and Set ' is =1'.
IF (
SUM('table'[I_F_highDangerGoals]) +
SUM('table'[I_F_mediumDangerGoals]) +
SUM('table'[I_F_lowDangerGoals]) > 0,
1,
0
)
Hope this works:)
@MasonMA I just figured it out! Thank you so much for your help! I hope you have a great rest of your day! 🙂
Happy to see it works! You can also mark this as solution so other people can find it:)
I am so sorry @Mason ! I am very new to Power BI and it has changed a lot since last time I used it(10 yrs ago). I believe I have the correct format but in dax it is showing that my IF statement syntax is incorrect. I assume I would create this this visual filter and it will be selectable in the Data pane once created; After that I can use it under ""Filters on this visual"?