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
emaioudamari
New Member

Dynamic measures based on slicers

Hello,

 

I have two measures calculating the revenue from two different months, and I need them both for another measure that compares both periods:

 

Gross Revenue Previous Month =
CALCULATE (
SUMX ( 'FCT_GP-Revenue', 'FCT_GP-Revenue'[Total Revenue] ),
DIM_Accounts[Type 2] = "Revenue",
'FCT_GP-Revenue'[Period] = 4
)
 
Gross Revenue Current Month =
CALCULATE (
SUMX ( 'FCT_GP-Revenue', 'FCT_GP-Revenue'[Total Revenue] ),
DIM_Accounts[Type 2] = "Revenue",
'FCT_GP-Revenue'[Period] = 5
)
 
I was hoping to use two slicers to select both periods to compare, instead of using 5 and 4, but I have no idea how to do that. Could anyone please support?
 
Thank you!
 
Marianne
1 REPLY 1
v-xiaoyan-msft
Community Support
Community Support

Hi @emaioudamari ,

 

I'm not quite sure if I understand your needs accurately.
Sample data without sensitive information and expected output would help tremendously.
Please see this post regarding:

 How to get your question answered quickly 

How-to-provide-sample-data-in-the-Power-BI-Forum 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the 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.