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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Display values of a filter in a bar chart

I have a bar chart that consists of two measures and dimenssão which is the year, I need this chart to have some year filtered view beyond the filtered value from previous years, for example 2014 filter: will display the values of 2014 2013 2012 ........, an example of a chart made in QlikView is below, and the measures used too.

 

measures:

Not processed = sum (Facts [Vl_RestoNa processed])

 

Processor = no (Facts [Vl_RestoProcessado])

 

Untitled.png

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

YOU CAN USE THIS FORMULA

 

PY SALES=CALCULATE([Total Sales],DATEADD(DimDate[Datekey],-1,YEAR))

 

[TOTAL SALES] = SUM([SALES AMOUNT])

 

CHANGE THE -1 PART AS PER WHAT AMOUNT WOULD YOU LIKE.

 

IF YOU LIKE LAST 2 YEARS, CHANGE IT TO -2. 

YOU NEED A RELATIONSHIP WITH DATE TABLE TO CREATE A TIME INTELLIGENCE CALCULATIONS.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
Anonymous
Not applicable

@BhaveshPatel

I created the expression as indicated however failed.

the graph showed no value, I applied the new expression with dimenssão year, is that right?

Remains processed = CALCULATE ([processed]; DATEADD (DMEGF_Ano [Year] - 1, YEAR))

@Anonymous

 

In Power BI, we can't add condition based on current selection in slicer to control the rendering records in visuals. For your requirement, I suggest you use custom visual like Timeline to select date range to display data. You can download it from: https://app.powerbi.com/visuals/

 

Regards,

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Solution Authors