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
yaman123
Post Patron
Post Patron

Use value of measure in another page to divide

Hi, 

 

I have a measure in Page 1 which shows the YTD Volume when a date is selected in a slicer (sample date).

 

I have another measure in Page 2 which shows YTD Retirer Volume when a date is selected in another slicer (supply end date). 

 

I need a new measure which divides the results of YTD Retirer Volume /  results of YTD Volume. 

 

E.g

YTD volume in Page1 is 1000 between sample date 01/02/2021 and 28/02/2021

YTD Retirer Volume in Page2 is 500 between supply end date 01/02/2021 and 28/02/2021

 

500/1000 = 0.5 

 

TIA

 

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @yaman123 ,

 

For measures, the values are calculated based on the computing environment, Row Context and Filter Context. In your scenario, measures are on different pages and filtered by different slicers. So, we can't use the result of YTD Retirer Volume in Page2 directly. 

 

One method is to sync the "supply end date" slicer on Page1 and set it only affect a single visual which shows the result of your new measure which divides the results of YTD Retirer Volume /  results of YTD Volume. And the filters on Page2 may need to set again.

 

If the sample date and supply end date slicers are always set in the same period, another method is to create a date dimension table and create create relationships between 'yourfacttable'[sample date] and 'datedimensiontable'[date], 'yourfacttable'[supply end date] and 'datedimensiontable'[date]. Both of the two relationships are inactive and use USERELATIONSHIP function (DAX) to "active" the one needed in measures. Then, we can use only one slicer to filter both sample date and supply end date. 

 

 

Best Regards,

Icey

 

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

4 REPLIES 4
amitchandak
Super User
Super User

@yaman123 , have you create a common date and other dimension tables. You can use common date table and analyze data with that

 

YTD volume= CALCULATE([volume],DATESYTD('Date'[Date],"12/31"))

 

 

YTD volume= CALCULATE([Retirer  volume],DATESYTD('Date'[Date],"12/31"))

 

or same table change date

calculate( calculate( [Retirer  volume],USERELATIONSHIP ('Table'2[Supply end date], 'Date'[Date])),DATESMTD('Date'[Date]))

 

Power BI — Year on Year with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a
https://www.youtube.com/watch?v=km41KfM_0uA

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

@amitchandak 

 

I have two date columns in the table. I dont have a date dimension table as all the data is in this table. 

 

I only need the results from page 1 and divide by results in page 2? 

Icey
Community Support
Community Support

Hi @yaman123 ,

 

Did I explain it clearly? Are these methods applicable to your scenario?

 

 

Best Regards,

Icey

Icey
Community Support
Community Support

Hi @yaman123 ,

 

For measures, the values are calculated based on the computing environment, Row Context and Filter Context. In your scenario, measures are on different pages and filtered by different slicers. So, we can't use the result of YTD Retirer Volume in Page2 directly. 

 

One method is to sync the "supply end date" slicer on Page1 and set it only affect a single visual which shows the result of your new measure which divides the results of YTD Retirer Volume /  results of YTD Volume. And the filters on Page2 may need to set again.

 

If the sample date and supply end date slicers are always set in the same period, another method is to create a date dimension table and create create relationships between 'yourfacttable'[sample date] and 'datedimensiontable'[date], 'yourfacttable'[supply end date] and 'datedimensiontable'[date]. Both of the two relationships are inactive and use USERELATIONSHIP function (DAX) to "active" the one needed in measures. Then, we can use only one slicer to filter both sample date and supply end date. 

 

 

Best Regards,

Icey

 

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.