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
MartinP
Regular Visitor

Slicer Two Dates with min amd max values

Dear Sirs

 

I would like to ask you for your help, cannot find solution in the best Power BI community ... 🙂

 

My basis are:

Table Category

      - Columns: Article code, Model (and more...)

Table Date 1

      - Columns: Date

Table Date 2 with not active realtionsip to Date 1

      - ALLNOBLANKROW('Date 1')

Table Prices

      - Column Article code (relation to Category)

      - Column Date (relation to Date 1)

      - Column Costs 1 

      - Column Costs 2

      - Measure Costs 1 (AverageX)

      - Measure Costs 2

                  Materiál 2 = CALCULATE(
                       [Costs 1],
                       ALL ( 'Date 1' ),
                       USERELATIONSHIP( 'Date 1'[Date], 'Date 2'[Date] ) )

      - Measure Difference 1 = [Costs 2]-[Costs 1]

      - Measure Difference 2 = divide ([Difference 1],[Costs 1])

 

Now I use two Slicer (Date 1 and Date 2) for comparing Cost of articles with two different Dates - I have Matrix (Article code / Measure Costs 1 / Measure Costs 2 / Difference 1 / Difference 2)

Now I would would need to use Slicer Between for filtering the Matrix and the Slicer set with Min and Max value of Difference 2

 

I have tried following - but I am not able to set Value with Min and Max according Difference 2

Measure Filter =
VAR MinValue = min('Number Filter'[Value])
VAR MaxValue = max('Number Filter'[Value])
VAR CMV = 'Prices'[Difference 2]
Return
IF(
CMV >= MinValue && CMV <= MaxValue,1,0
)

 

If you need any additional informations please let me know

 

I would like to ask you for your support

 

Have a nice day

Martin 

 

 

4 REPLIES 4
amitchandak
Super User
Super User

@MartinP , Not very clear, refer my blog how to use two date table and slicers

https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @MartinP share the file with me and Ill look into it that what actually you want.

Please use following like for download (file PBIX) I do now see how to add file directly .. 

https://korado-my.sharepoint.com/:u:/g/personal/martin_preisler_korado_cz/EcHJSzuvL41Ivu7sIb91K9wB3T...

I would need add Slicer which shows values Between - for example: filter Date 1 (S201902) Date 2 (S201903) Value of Between Slicer (Costs Difference %) Min -33,3% (Article D) Max value 4,0%

The file includes thousands of rows and more filters I simplified it ... 

Thank you for your suport

Martin

 

Anonymous
Not applicable

Hello @MartinP ,

I updated your sample pbix file: create two measures to get min and max difference%, please find the details in the attachment:

00_mindiff% = MINX(ALLSELECTED('Category'),[Costs difference %])
00_maxdiff% = MAXX(ALLSELECTED('Category'),[Costs difference %])

Slicer Two Dates with min amd max values.JPG

Best regards

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