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 would like to show YTD revenue figures for this year, last year and target on the same line chart.
When I try to pull last year data, PowerBI treats it as one continuous dataset as all dates are coming from a date table.
This is what I have. I just
the DAX used to calculate YTD values is:
Please note, I am operating in direct query mode hence calcualted columns are not an option for me.
@rajulshah almost but not quite there.
The DAX you provided results in the billow visual.
I think this is because the revenue for each year resides in two seperate tables.
So i have a table called FY23 and another called FY22. I think the sameperiodlastyear function checks for datafrom the last year in FY23 table, except there isn't any? and for some reason it's spitting it out as FY24 instead.
Not sure, that could be the reason.
You can create a measure as follows:
YTD_Billed22 = CALCULATE ( [YTD_Billed] , SAMEPERIODLASTYEAR ( 'Fiscal Year Table' [ Date ] ) )
Please let me know if this didn't work.
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 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |