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
vikramsharma18
Frequent Visitor

Data Comparision from two date slicer

vikramsharma18_0-1656394118103.png

One slicer date is random and compare slicer is just 30 days or 1 month back from the selection.
how will we archive it in power bi?

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @vikramsharma18 

 

Need 2 unrelated date tables to control 2 different date slicers. I have simulated some data that I hope will fit your situation.

vzhangti_0-1656680500473.png

Table:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Measure:

Sum1 = SUM('Table'[Value])
Sum2 = 
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]>=MIN('Date'[Date])&&[Date]<=MAX('Date'[Date])))
Measure = IF(MIN('Date'[Date])>=MIN('Table'[Date])+30,1,0)

vzhangti_1-1656680606695.png

In this case, the 2nd slicer can only display the date 30 days after the first slicer.

vzhangti_2-1656680686476.png

As shown in the figure, 2 slicers control 2 values separately and can be compared.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @vikramsharma18 

 

Need 2 unrelated date tables to control 2 different date slicers. I have simulated some data that I hope will fit your situation.

vzhangti_0-1656680500473.png

Table:

Date = CALENDAR(MIN('Table'[Date]),MAX('Table'[Date]))

Measure:

Sum1 = SUM('Table'[Value])
Sum2 = 
CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),[Date]>=MIN('Date'[Date])&&[Date]<=MAX('Date'[Date])))
Measure = IF(MIN('Date'[Date])>=MIN('Table'[Date])+30,1,0)

vzhangti_1-1656680606695.png

In this case, the 2nd slicer can only display the date 30 days after the first slicer.

vzhangti_2-1656680686476.png

As shown in the figure, 2 slicers control 2 values separately and can be compared.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@vikramsharma18 , Check if you are looking something like

 

How to use two Date/Period slicers

https://youtu.be/WSeZr_-MiTg

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.