Forum Discussion
help with looping on a table
- 5 years ago
Hi, Anonymous
Please check the below picture and the sample pbix file's link down below.
Action Measure =SWITCH (TRUE (),CALCULATE ( SUM ( 'Table'[Cost] ), 'Table'[Month] = 2 ) > 70&& CALCULATE ( SUM ( 'Table'[Cost] ), 'Table'[Month] = 1 ) < 70, "Added",CALCULATE ( SUM ( 'Table'[Cost] ), 'Table'[Month] = 2 ) < 70&& CALCULATE ( SUM ( 'Table'[Cost] ), 'Table'[Month] = 1 ) > 70, "Removed")Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
Thanks.This is exactly i was looking for.I was trying to find something that went through each row but guess you had a better idea.One more thing i tried to put in a slicer for the month so that instead of giving the month number hardcoded,it would just take the month selected but somehow didnt work.Your thoughts on that would be helpful.
Thanks
Hi, Anonymous
Thank you for your feedback.
I tried to create a slicer for selecting a month.
Please check the link down below.
However, because the sample only shows two months, I am not sure whether it is properly showing the result or not.
If you have other sample pbix file, please share the link here then I can try to look into it to come up with a more accurate measure.
Thanks.
https://www.dropbox.com/s/q4xxntihij2ymy3/bespeck.pbix?dl=0
- Anonymous5 years agoNot applicable
What you have provided is great.Thanks a lot.But if there is anything will srely come back.
Thanks again