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 date column CREATE_DATE and an ID column. I would like to display in a card the count of the year-to-date of Ids based on a slider which is controlled by a column called MMM_YY.
For example if the User selects the slider to be 'January 2019" then the YTD is the number of rows in the ID column which could be 10. However if the User selects March 2019 in the slider the values displayed in the card is 45 (say).
My dax expression does not work. Could anybody help? Thank you,
Solved! Go to Solution.
You should try using SAMEPERIODLASTYEAR
Total Sales YTD Last Year = CALCULATE([Total Sales YTD],SAMEPERIODLASTYEAR('date'[date]))
In your case. First, find the date and use that in the above formula
Var1 date1 =calculate (max(WATER_QUALITY_APPREARANCE_DB[created_date]),(WATER_QUALITY_APPREARANCE_DB[MMM_YY]))
Refer
https://databear.com/power-bi-tips-calculating-year-to-date-values/
Preferably have a date calendar and marked that to the date calendar in the Model view
You should try using SAMEPERIODLASTYEAR
Total Sales YTD Last Year = CALCULATE([Total Sales YTD],SAMEPERIODLASTYEAR('date'[date]))
In your case. First, find the date and use that in the above formula
Var1 date1 =calculate (max(WATER_QUALITY_APPREARANCE_DB[created_date]),(WATER_QUALITY_APPREARANCE_DB[MMM_YY]))
Refer
https://databear.com/power-bi-tips-calculating-year-to-date-values/
Preferably have a date calendar and marked that to the date calendar in the Model view
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 |
---|---|
114 | |
99 | |
75 | |
73 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |