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.
Hello,
I'm trying to get a cumulative overview of the last 3 years using the following measure:
Working well except for the month where I have no voyage, i.e., September. The information from 2017 is missing.
Solved! Go to Solution.
@JoaoPvP , If you are using Year = max( year) Than is as good YTD ??
Voyages_agg_test = CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); AND( 'Calendar'[Date] <= MAX(CE[COD]) ; YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) )) ))
Try like
Voyages_agg_test = CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); AND( 'Calendar'[Date] <= MAX('Calendar'[Date] ) ; YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) )) )
because when COD is not there it will fail
you can have filter to stop at max cod value
like
Voyages_agg_test =
var _max = MAXX(allselected(CE),CE[COD])
return
CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); 'Calendar'[Date] <= MAX('Calendar'[Date] ) && YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) &&
'Calendar'[Date] <= _max) ) )
For YTD refer : YTD Questions — Time Intelligence 1–5
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
@JoaoPvP , If you are using Year = max( year) Than is as good YTD ??
Voyages_agg_test = CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); AND( 'Calendar'[Date] <= MAX(CE[COD]) ; YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) )) ))
Try like
Voyages_agg_test = CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); AND( 'Calendar'[Date] <= MAX('Calendar'[Date] ) ; YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) )) )
because when COD is not there it will fail
you can have filter to stop at max cod value
like
Voyages_agg_test =
var _max = MAXX(allselected(CE),CE[COD])
return
CALCULATE( COUNT(CE[Voyage]); FILTER( ALL('Calendar'); 'Calendar'[Date] <= MAX('Calendar'[Date] ) && YEAR('Calendar'[Date]) = YEAR( MAX('Calendar'[Date]) &&
'Calendar'[Date] <= _max) ) )
For YTD refer : YTD Questions — Time Intelligence 1–5
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
Hi,
Used
What is the desired behaviour? It's not clear from your chart what is wrong..
Hi Andre,
I would like to have a bar in September 2017, which is missing from the chart.
Thank you,
João
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |