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

Percentage of change with 2 data slicers

Hi,

 

I have a scenario with two data slicers. The first data slicer filters data for the current period, the second one for a previous period. By editing visual interactions I got this works at the same page.

Now I want to calculate percentage change between two values and this is a point where I have a problem - my % of change is always 100 or 0. How can I solve this? Please see a screenshot below.

This is how I calculate "number of transactions (# of Transactions):

 

# of Transactions = COUNT(Report[ProductID]) - for the current period
# of Transactions PP = COUNT(Report[ProductID]) - for a previous period period

 

 

These two measures are sliced with two different data slicers and the resultsare 1,990 / 2,787. Now I want to calculate % of change. I tried with: 

 

% Change = 1 - DIVIDE([# of Transactions],[# of Transactions PP])

I understand why a result is 100% ut I don't know how to fix it (I need both data slicers on he page).

 

dashboard.JPG

2 REPLIES 2
LakiCG
Frequent Visitor

I made some changes but still don't right result. i made two date columns - each for both date slicers, and I calculated First Date and Last Date for each date range. The percantage change is still wrong.

 

# of Transactions = CALCULATE(COUNT(Report[ProductID]),DATESBETWEEN(Report[Date],[Start Date],[Last Date]))


# of Transactions PP = CALCULATE(COUNT(Report[ProductID]),DATESBETWEEN(Report[Date PP],[Start Date PP],[Last Date PP])) - previous period (second slicer)


% Transaction Change = ([# of Transactions]/[# of Transactions PP]) - 1

HI @LakiCG,

 

I think these timeline slicers are use same source column with different interaction to effect measures, right?

 

If this is a case, power bi not support to get different result from same datasource column at same time.

 

Please duplicate a table with same relationship and use this table as source one of timeline slier to achieve your requirement.

 

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.