Forum Discussion
Average over SUMX
- 6 years ago
hi Anonymous
You could use this two formula to get the custom bins:
Census to Bin = CALCULATE(SUM('FactPremium'[Census Total]),ALLEXCEPT('FactPremium','FactPremium'[Group Name],'FactPremium'[Coverage Type],'FactPremium'[Coverage Date]))Desired Bin = IF(FactPremium[Census to Bin]<=1,"", IF(FactPremium[Census to Bin]<=14,"2-14", IF(FactPremium[Census to Bin]<=24,"15-24", IF(FactPremium[Census to Bin]<=99,"25-99", IF(FactPremium[Census to Bin]<=499,"100-499", IF(FactPremium[Census to Bin]<=999,"500-999", "1000+"))))))and here is sample pbix file, please try it.
Regards,
Lin
My apologies, as I am new to this forum, but I did not see where I could attach a file, which is why I just posted the screen shots. Would you know how I could do this?
Hi,
Upload the workbook to Google Drive and share the download link.
- Anonymous6 years agoNot applicable
I appreciate you taking the time to look, but I was able to solve the problem by using the following:
AVERAGEX(
KEEPFILTERS(
CROSSJOIN(
VALUES(FactPremium[Group Name]),
VALUES(FactPremium[Coverage Date])
)
),
[Census Total Average]
)- Anonymous6 years agoNot applicable
I'm still having the issue with the custom bins.
Below shows my desired result:
https://drive.google.com/open?id=1byb6ubhpSlrjJ3XYHIeBwI2USOSMCGZz
Below is the sample pbix:
https://drive.google.com/open?id=1YHFSIEb-xEmKCUUe6YMy2tZ8CqkgiIJR- v-lili6-msft6 years ago
Community Support
hi Anonymous
You could use this two formula to get the custom bins:
Census to Bin = CALCULATE(SUM('FactPremium'[Census Total]),ALLEXCEPT('FactPremium','FactPremium'[Group Name],'FactPremium'[Coverage Type],'FactPremium'[Coverage Date]))Desired Bin = IF(FactPremium[Census to Bin]<=1,"", IF(FactPremium[Census to Bin]<=14,"2-14", IF(FactPremium[Census to Bin]<=24,"15-24", IF(FactPremium[Census to Bin]<=99,"25-99", IF(FactPremium[Census to Bin]<=499,"100-499", IF(FactPremium[Census to Bin]<=999,"500-999", "1000+"))))))and here is sample pbix file, please try it.
Regards,
Lin