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! Request now

Reply
BobBiff
Frequent Visitor

Creating Baseline Measure that can be modified using a slicer.

I've been hunting around for a solution to this but I cant seem to get anywhere.

 

I have data that looks like this (truncated) 

WeekEndingPeriodCount
18/09/20221400
18/09/20222523
18/09/20223447
25/09/20221446
25/09/20222488
25/09/20223440
02/10/20221415
02/10/20222535
02/10/20223435
09/10/20221422
09/10/20222583
09/10/20223484
16/10/20221428
16/10/20222554
16/10/20223407
23/10/20221490
23/10/20222552
23/10/20223476
30/10/20221425
30/10/20222520

 

I have been asked to create line graph visualisations that look at the Count over the three Periods within a given week.

 

My manager wants to be able to use a slicer to nominate a "baseline" week, that a second nominated "comparison" week can be compared to. It needs to be a slicer because the baseline week may change. The comparison week is usually (but not always) the most recent week, so will need its own independant slicer as well.

 

They want to see two lines in the same graph that show how the comparison week varies from the baseline. 

 

I've tried to use a date table to filter the measure but I kep geting tied up in knots.

 

Any advice on tools to use to acheive this?

4 REPLIES 4
johnyip
Solution Sage
Solution Sage

@BobBiff 

Is this what you want to achieve?

johnyip_0-1697989689954.png

 

 

Based on your sample file, you can follow the below steps to construct the above shown in my attached file.

 

1. Create two calculated table using the below DAX. You may wish to change the data type of the column as Date for beauty purpose.

 

Baseline Week = SELECTCOLUMNS(DISTINCT('Table'[WeekEnding]),"Baseline Week", [WeekEnding])

Comparsion Week = SELECTCOLUMNS(DISTINCT('Table'[WeekEnding]),"Comparsion Week", [WeekEnding])

 

 

2. Create two measures as below.

 

Baseline = CALCULATE(SUM('Table'[Count]),'Table'[WeekEnding] = SELECTEDVALUE('Baseline Week'[Baseline Week]))

Comparsion = CALCULATE(SUM('Table'[Count]),'Table'[WeekEnding] = SELECTEDVALUE('Comparsion Week'[Comparsion Week]))

 

 

3. Use those two columns from the calculated tables in your slicers, and those two measures in your visualization.



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
johnyip
Solution Sage
Solution Sage

Can you provide some expected outcomes of your visuals for reference? I can ot quite guess what comparsion is done based on the "baseline", and how do you determine the second nominated "comparison week".



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!

The aim is that the maximum number of count occurs in the earlier periods. They want to set a baseline for a certain point in the year (e.g. a week in July) and then compare later weeks to that one to see if the distribution is better or worse.

BobBiff
Frequent Visitor

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