Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Dear community,
I want to produce a bar chart in Power BI showing the differences between two years for: sales, average sales, total hours and total training. I want to split it into two categories: Operational (sales and avarage sales) and Training (total hours and total training). Now my bar chart looks like this:
I want it to be interactive, i.e I want to choose two years in the slicer. The differences have been computed by measures:
E.g. the percentage difference for sales:
Solved! Go to Solution.
@emillia1991 , Use a separate Date or Year Table, joined with your table
new measure =
var _max = maxx(allselected(Date),Date[Year])
var _min = minx(allselected(Date),Date[Year])
return
calculate( sum(Table[Value]), filter('Date', 'Table'[Date] =_max )) - calculate( sum(Table[Value]), filter('Date', 'Table'[Date] =_min ))
@emillia1991 , Use a separate Date or Year Table, joined with your table
new measure =
var _max = maxx(allselected(Date),Date[Year])
var _min = minx(allselected(Date),Date[Year])
return
calculate( sum(Table[Value]), filter('Date', 'Table'[Date] =_max )) - calculate( sum(Table[Value]), filter('Date', 'Table'[Date] =_min ))
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |