Forum Discussion
DISTINCOUNT IF certain condition met
- 5 years ago
Hello, ckhoo2007
I create two measures to sum total in pie chart. I also modified the total to make it display correctly. You can check the below sample file.
Like this:
Measure1 = SUMX ( ADDCOLUMNS ( ADDCOLUMNS ( SUMMARIZE ( ALLSELECTED( Sales ), Sales[Client], "t30", CALCULATE ( DIVIDE ( SUMX ( 'Sales', 'Sales'[Sales] * 'Sales'[Transactions] ), SUM ( 'Sales'[Transactions] ) ), DATESINPERIOD ( Sales[Date], MAX ( Sales[Date] ), -30, DAY ) ), "t60", CALCULATE ( DIVIDE ( SUMX ( 'Sales', 'Sales'[Sales] * 'Sales'[Transactions] ), SUM ( 'Sales'[Transactions] ) ), DATESINPERIOD ( Sales[Date], MAX ( Sales[Date] ) - 30, -30, DAY ) ) ), "t30-t60", [t30] - [t60] ), "bb", IF ( [t30-t60] > 0, 1 ) ), [bb] )Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,Community Support Team _ Janey
Hi, ckhoo2007
There is no context in the pie chart, so there may be problems with the value of the measure.
There is no problem with the table you shared, because these columns are all measures. Can you share a sample fake data sample? So we can help you soon.
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please feel free to ask me.
Best Regards,
Community Support Team _ Janey
Thanks Janey and Nidhi.
I have the sample database in excel and sample pbix, stupid question, how do I attached here?
Regards,
Choo
- v-janeyg-msft5 years ago
Community Support
Hello, ckhoo2007
Please upload sample files to onedrive for business, and then send the anonymous link here.
Best Regards,
Community Support Team _ Janey
- ckhoo20075 years ago
Helper I