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.
I have a matrix and line graph below with the same measures.
In the matrix, I have months from date table going across and going down are the measures for each year.
In the line graph, I want to have it connected for all months and if there is no data then to connect on the zero. The measure calc is just time intelligence:
Solved! Go to Solution.
Hi @loafers ,
According to your requirement description, you want to implement 0 for months with no value in the past and blanks for months with no value in the future, right?
If this is the case, you can try modifying this measure to achieve your needs like this:
Measure=
IF(Max('Date'[Date])<eomonth(today,-1)+1,
CALCULATE([Revenue],DATESMTD(DATEADD('Date'[Date],0,MONTH)))+0,blank())
Thank you for your time, if there is a data display problem, you can provide the following .pbix file or data that does not contain sensitive data.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @loafers ,
According to your requirement description, you want to implement 0 for months with no value in the past and blanks for months with no value in the future, right?
If this is the case, you can try modifying this measure to achieve your needs like this:
Measure=
IF(Max('Date'[Date])<eomonth(today,-1)+1,
CALCULATE([Revenue],DATESMTD(DATEADD('Date'[Date],0,MONTH)))+0,blank())
Thank you for your time, if there is a data display problem, you can provide the following .pbix file or data that does not contain sensitive data.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@loafers , Try like
0 between range
Measure = var _1= CALCULATE([Revenue],DATESMTD( 'Calendar'[Date]) ) +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 |
---|---|
115 | |
99 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |