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.
Hi, I have created a measure to calculate current year amounts. This measure seems to work properly. When I wrap it with sameperiodlastyear, the new measure generates the same amount as the first measure. Please help.
Hi @Jeanxyz ,
How do your dim_date table and matrix look like? Did the dim_date table have relationship with the fact table? Your formula looks correct. It's better that you can show us sample pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
it does not work for you because the second formula (SAMEPERIODLASTYEAR) does not know what the selected date (year) is.
adds a filter to the sheet where the user selects the required year, that way both formulas recognize the filter and execute the correct value.
thanks, but I have removed year filter in the first measure. the time intelligence filter still doesn't work.
Instead of
var curr_year=convert(year(today()),string)
try
var curr_year=MAX(DateTable[Year])
where DateTabe is your calendar table with a Year column set to Date type.
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 |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |