Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
marcos_osorio
Helper II
Helper II

Slicer and measures

HI, I'm really new in PowerBI, i want to know if its possible this:

 

I have a table with several columns, on of the for example is Qtty. 

 

I like to display something like:

This year Qtty|Diff vs Last Year Qtty filtered by some filed type.

I already made a measure and work as a total, ex:

LY Qtty = CALCULATE(SUM('BI Analysis'[Qtty]),YEAR('BI Analysis'[DATE RECORD])=2017,'Type of Data'[TYPE] = "Result" )
TY Qtty = CALCULATE(SUM('BI Analysis'[Qtty]),YEAR('BI Analysis'[DATE RECORD])>2017,'Type of Data'[TYPE] = "Shipment Result" )
Then I use TY minus LY. 
This wors fine, but I want to insert a slicer based on [DATE RECORD] and to respond in base of that.
Now if i do it, the TY works fine, but the LY show now data when selecting for example the range: [05-01-2018/12-31-2018]
Is there a  way to do it?
 
Thanks, 
 
2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @marcos_osorio ,

Could you please offer your sample data and post your desired result if possible?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sorry for the delay, I could manage to do it.

 

Thank you very much.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors