Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi community,
I'm having some trouble with a line graph showing blank values:
As you can see the financial year runs from March to February. In this instance there were no sales in February 2021 so there is no point plotted on the graph, however I need to show this as 0.
I used the following DAX to plot this point on the graph:
Now I have an issue with how future months, eg July-February 2022 are showing a line at 0.
How do I keep the point for Feb 2021 but drop the future month points from the graph?
Here is the pbix file.
Thanks!
Solved! Go to Solution.
Hi amitchandak, thanks for your reply.
It didn't work because it is using the max date from the calendar rather than the last day of the previous month.
I used SQL & power query to define this and then used your measure and it worked.
For anyone else that is having this problem, here's the pbix with the solution.
Hi amitchandak, thanks for your reply.
It didn't work because it is using the max date from the calendar rather than the last day of the previous month.
I used SQL & power query to define this and then used your measure and it worked.
For anyone else that is having this problem, here's the pbix with the solution.
@C4L84 , Try to control like
0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
68 | |
59 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |