Forum Discussion
Matrix Showing Difference Between Two Years
- 11 months ago
Hi Anon2020 , Thank you for reaching out to the Microsoft Fabric Community Forum.
I reproduced the scenario on my end using sample data and it worked successfully. To help you better understand the implementation, I’ve attached the .pbix file for your reference. Please take a look at it and let me know your observations.
Thank you for being part of the Microsoft Fabric Community!
this is as close as I can get, but still not showing difference, and still showing values between fiscal years instead of in the last column
Anon2020 You would need to get the Maximum and Minimum values for the Opp_FY_c column. Then you would need to have 2 CALCULATE statements where you calculate the SUM for the TotalPrice column, once for the Maximum value and once for the Minimum value. Modify your filter clause within each CALCULATE statemetn. Then you simply need to subtract one from the other.
- Anon20201 year agoHelper I
would be be so kind to show me?
- GeraldGEmerick1 year agoSuper User
Anon2020 I can certainly endeavor to do so.
Measure = VAR _maxFY = MAX( Opportunity[Opp_FY_c] ) VAR _minFY = MIN( Opportunity[Opp_FY_c] ) VAR _sumMaxFY = CALCULATE( SUM( 'Opportunity Product'[TotalCost] ), Opportunity[Opp_FY__c] = _maxFY ) VAR _sumMinFY = CALCULATE( SUM( 'Opportunity Product'[TotalCost] ), Opportunity[Opp_FY__c] = _minFY ) VAR _return = _sumMinFY - _sumMaxFY RETURN _returnHopefully this gets you the answer you are looking for or at least gets you close enough.
- Anon20201 year agoHelper I
I keep thrwoing zeros, and do not know why. Can I send you the pbix file?