Forum Discussion
hiding YOY difference for future dates
- 5 years ago
Hi,
Does this measure work?
Measure = SUMX(SUMMARIZE(Calendar,Calendar[Year],Calendar[Month],"ABCD",[diff YoY Acctual]),[ABCD])
If it does not, then share the link from where i can download your PBI file.
- 5 years ago
- Anonymous5 years ago
Hello Ashish,
in the dummy file I created a custom column called month name in the calendar table, then used the measure you created
Month number = MONTH('calendar'[calendar])Measure = SUMX(SUMMARIZE('calendar','calendar'[Year],'calendar'[Month Name],"ABCD",[diff yoy amount]),[ABCD])but I could not get the total to calculate correctly. also, if I use the Month name and Year in the calendar table separatly (w/o date hiearchy) i can not longer sort on the year. did you make any other changes to the file? I'd like to understand what changes were made so I can implment the code to actual data.
Hi,
Does this measure work?
Measure = SUMX(SUMMARIZE(Calendar,Calendar[Year],Calendar[Month],"ABCD",[diff YoY Acctual]),[ABCD])
If it does not, then share the link from where i can download your PBI file.
Hello Ashish,
THanks for the reply, when I try to put the measure in, this is the error I get. I do have a calendar table. how do you prefer I share the PBIX File?
- Ashish_Mathur5 years ago
Super User
Hi,
Upload the file on Google Drive and share the download link here.
- Anonymous5 years agoNot applicable
thanks I'm going to create some dummy data.
- Anonymous5 years agoNot applicable
https://drive.google.com/file/d/1DUe9RNOXMqIOPGB1n4h-197L0Yni9f9c/view?usp=sharing
here you go, I created the file with diff YOY amount just calcuated as revenue-revnue ly. as you can see it is calculating into the future, I'd like to exclude that from my visual.
- Anonymous5 years agoNot applicable
Hello Ashish,
in the dummy file I created a custom column called month name in the calendar table, then used the measure you created
Month number = MONTH('calendar'[calendar])Measure = SUMX(SUMMARIZE('calendar','calendar'[Year],'calendar'[Month Name],"ABCD",[diff yoy amount]),[ABCD])but I could not get the total to calculate correctly. also, if I use the Month name and Year in the calendar table separatly (w/o date hiearchy) i can not longer sort on the year. did you make any other changes to the file? I'd like to understand what changes were made so I can implment the code to actual data.
- Ashish_Mathur5 years ago
Super User
- Anonymous5 years agoNot applicable
Thank you so much for your help, but now I have a different problem,
As you can see the YOY is calculated correctly now at the year month level, but it is not correct at the customer level. I need a generic YOY difference measure that can calculate YOY difference in by any column. Any help with how to modify the code would be super helpful. Thank you again for your help.
https://drive.google.com/file/d/11iIHWdMjnCOGJOmBBiIjFH2ljTKJ6vN3/view?usp=sharing