Forum Discussion
Customer Sales Grouping Report
- Anonymous1 year ago
Hi DataNinja777 ,thanks for the quick reply, I'll add more.
Hi adriankohws ,
Assuming this was my situation at the beginning, it should be similar to your scenario. If there is a big difference, please share the .pbix file without sensitive data.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Please follow these steps:
1.Enter the following data manually
2.Sort by column
3.Creating table-to-table relationship
4.Use the following DAX expression to create a measure
Measure = VAR _denominator = CALCULATE(SUM('Table'[Amount]),ALL('Table')) VAR _numerator = CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Name])) VAR _column = SELECTEDVALUE('Table 2'[Month]) RETURN IF( _column = "%",FORMAT(DIVIDE(_numerator,_denominator),"0.00%"),SUM('Table'[Amount]))5.Final output
19.23% = 150 / 780
Best Regards,
Wenbin Zhou
I tried this and it worked to create the measure.
- Anonymous1 year agoNot applicable
Hi DataNinja777 ,thanks for the quick reply, I'll add more.
Hi adriankohws ,
Assuming this was my situation at the beginning, it should be similar to your scenario. If there is a big difference, please share the .pbix file without sensitive data.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Please follow these steps:
1.Enter the following data manually
2.Sort by column
3.Creating table-to-table relationship
4.Use the following DAX expression to create a measure
Measure = VAR _denominator = CALCULATE(SUM('Table'[Amount]),ALL('Table')) VAR _numerator = CALCULATE(SUM('Table'[Amount]),ALLEXCEPT('Table','Table'[Name])) VAR _column = SELECTEDVALUE('Table 2'[Month]) RETURN IF( _column = "%",FORMAT(DIVIDE(_numerator,_denominator),"0.00%"),SUM('Table'[Amount]))5.Final output
19.23% = 150 / 780
Best Regards,
Wenbin Zhou