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 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.
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 |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |