Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello everyone,
Hope you are well,
I would like to make a measure that returns my "Date, Period" to Count of Months up to that month.
For example if I select March 2020 = the Measure should show : 3 (Jan Feb March) counts.
If i choose my date filter April 2019 = the Measure should show : 4 (Jan Feb March) counts.
Can you please help with this?
Thank you,
Regards,
Ahmet
Solved! Go to Solution.
@Anonymous , If April is coming from a date table
then
month(maxx(allselected(Date),Date[Date]))
or you can use a distinct count of the month
YTD Sales = CALCULATE(distinctcount(Table[Month]),DATESYTD('Date'[Date],"12/31"))
for that also prefer to have the calendar
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
Hi @Anonymous ,
You may create measure like DAX below.
Measure1= CALCULATE(MONTH(MAX(Table1[Date])), ALLSELECTED(Table1))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , If April is coming from a date table
then
month(maxx(allselected(Date),Date[Date]))
or you can use a distinct count of the month
YTD Sales = CALCULATE(distinctcount(Table[Month]),DATESYTD('Date'[Date],"12/31"))
for that also prefer to have the calendar
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
85 | |
67 |