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,
I have a table with dates and values. I want to show the values in a bar chart in the following way: All values of prevoius year should be aggregated to PYTD, all of the current year to YTD and months of current year should be displayed as single value.
thanks for your help!
Dominik
Solved! Go to Solution.
Hi @v-janeyg-msft, @Gabriel_Walkman .
thanks for your support and input.
However I want to see 2020, Jan to Apr and 2021 in one chart without using the drill down function.
As a workouraround I duplicate the current year data, create a new column with PY/YTD/Month (based on date) in both tables and and join them.
Dominik
Hi, @dominik_thoe
According to your description, I think you can directly use 'year and month' in the date hierarchy, then use the drill down function, you can easily get the results you want.
Like this:
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-janeyg-msft, @Gabriel_Walkman .
thanks for your support and input.
However I want to see 2020, Jan to Apr and 2021 in one chart without using the drill down function.
As a workouraround I duplicate the current year data, create a new column with PY/YTD/Month (based on date) in both tables and and join them.
Dominik
Hi!
To me, this sounds like bad practice. I'd make separate tables, one for PYTD and YTD and one for current year months.
For the Year graph, you can make a calculated column
PYTD or YTD =
var _y = year( [Date] )
var _ty = year( today() )
return
if( _y = _ty-1,
"PYTD",
if( _y = _ty,
"YTD"
)
)
For the Month graph I'd make a separate calendar table with month names, make a relationship between dates, and use the calendar[Monthname] as x-axis.
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 |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
147 | |
109 | |
107 | |
85 | |
63 |