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

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.

Reply
vitexo87
Post Prodigy
Post Prodigy

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.

@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))

@vitexo87

 

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.