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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Shelley
Continued Contributor
Continued Contributor

What's the Best Way to compare data, based on slicer selections

Does anyone know a good resource for how to do this:

 

We have several years' worth of sales data.

Our fiscal year ends on September 30.

I want to enable users to select any years, quarters or fiscal months they wish.

And compare the most recent year filtered with the prior year.

So, if the user interface defaults to showing four years, and the user selects also June and July (middle of the fiscal year), they are expecting to see June+July 2018 sales, June+July 2017 sales and 2018 vs. 2017 (% difference). However, what Power BI does is adds up June+July for all four years.

I must be missing something, but it seems these scenarios were so much easier in QlikView. It was like it was just automatic. It's making me think Power BI is meant for dashboards or static views because it seems filtering and having the formulas work correctly is very fragile.

So, does anyone have any tips and tricks and/or know of a blog or Microsoft post or a resource that outlines how to build expressions that are robust, whether we want to show YTD latest year, vs prior year and allow uses to select discrete time slicers, also comparing latest year vs prior as desired?

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Shelley

For youe example, You could create a measure to show June+July 2018 sales, June+July 2017 sales, then another measure to show 2018 vs. 2017 (% difference).

These measures should calculate based on the slicer using ALLSELECTED or SELECTEDVALUE function.

 

Best Regards

Maggie

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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