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
afaque03
Helper I
Helper I

Date comparison and the percentage difference between these two dates.

Hi Friends,

 

I am stucked in a situation I need to create a report where I have two slicer both of date. when I click on first date slicer the card should display the total amount for that very date and when I click on second slicer the second card should display the data of the date selected in second slicer.

 

The problem Iam facing is I need to calculate the percentage difference between the total that is being displayed in these two slicer.

 

My slicer 1

slicer 1.JPG

 

card 1

invoice 1.JPG

 

My slicer 2

slicer 2.JPG

 

card 2

invoice 2.JPG

 

 

 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @afaque03,

 

Does these slicers use different tables as sources? If this is a case, you can try to use below formulas to show percentage.

Percent M1 =
VAR m1 =
    CALCULATE ( [Measure1], ALLSELECTED ( Table1 ) )
VAR m2 =
    CALCULATE ( [Measure2], ALLSELECTED ( Table2 ) )
RETURN
    m1
        / ( m1 + m2 )

PercentM2 =

    VAR m1 =
        CALCULATE ( [Measure1], ALLSELECTED ( Table1 ) )
    VAR m2 =
        CALCULATE ( [Measure2], ALLSELECTED ( Table2 ) )
    RETURN
        m2
            / ( m1 + m2 )

 

If slicers are from same table, it is impossible to use multiple slicers to get different value from same table. You need to duplicate this table and use new table to get different result.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msftHey the date is coming from same dataset. So my two date slicer use the same dataset date field. and Date 1 slicer does not have any interaction with date 2 slicer same as vice versa

Hi @afaque03,

 

Can you please share a pbix file to test?

 

>>and Date 1 slicer does not have any interaction with date 2 slicer same as vice versa

AFAIK, this operation not help to get different value from same source table.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.