Forum Discussion
Comparing Two period slicer selection
- 6 years ago
Hi Mani_ms ,
I found that you filtered the group = BS in the matrix so I created a slicer for the group field and the following measure if I got it correctly:
Measure = VAR _group = SELECTEDVALUE ( 'FMA 011 CY'[Group] ) VAR _maxfis = CALCULATE ( MAX ( 'FMA 011 CY'[Fiscal Year/Period] ), ALLSELECTED ( 'FMA 011 CY'[Fiscal Year/Period] ) ) VAR _minfis = CALCULATE ( MIN ( 'FMA 011 CY'[Fiscal Year/Period] ), ALLSELECTED ( 'FMA 011 CY'[Fiscal Year/Period] ) ) VAR _max = CALCULATE ( SUM ( 'FMA 011 CY'[Balance - Cumulative] ), 'FMA 011 CY'[Group] = _group, 'FMA 011 CY'[Fiscal Year/Period] = _maxfis ) VAR _min = CALCULATE ( SUM ( 'FMA 011 CY'[Balance - Cumulative] ), 'FMA 011 CY'[Group] = _group, 'FMA 011 CY'[Fiscal Year/Period] = _minfis ) RETURN _max - _minAttached sample file: fille.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Hi Mani_ms ,
You can upload the dummy file to OneDrive for Business etc which can store files and just share this file link in the community.
Best Regards,
Yingjie Li
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
Please find the below dummy file for your reference. would be great if you could assist on this.
Thanks
Mani
- v-yingjl6 years agoCommunity Support
Hi Mani_ms ,
I found that you filtered the group = BS in the matrix so I created a slicer for the group field and the following measure if I got it correctly:
Measure = VAR _group = SELECTEDVALUE ( 'FMA 011 CY'[Group] ) VAR _maxfis = CALCULATE ( MAX ( 'FMA 011 CY'[Fiscal Year/Period] ), ALLSELECTED ( 'FMA 011 CY'[Fiscal Year/Period] ) ) VAR _minfis = CALCULATE ( MIN ( 'FMA 011 CY'[Fiscal Year/Period] ), ALLSELECTED ( 'FMA 011 CY'[Fiscal Year/Period] ) ) VAR _max = CALCULATE ( SUM ( 'FMA 011 CY'[Balance - Cumulative] ), 'FMA 011 CY'[Group] = _group, 'FMA 011 CY'[Fiscal Year/Period] = _maxfis ) VAR _min = CALCULATE ( SUM ( 'FMA 011 CY'[Balance - Cumulative] ), 'FMA 011 CY'[Group] = _group, 'FMA 011 CY'[Fiscal Year/Period] = _minfis ) RETURN _max - _minAttached sample file: fille.pbix
Best Regards,
Yingjie LiIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Edouard_864 years agoNew Member
Hi Yingjie Li,
Thanks for your answer, seems to have worked for others!
I am trying to do the same thing, but have limited experience in writing DAX, can you share your pbix file again?
Thanks a lot!