Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAx Formula

Hello All,

 

Please help me with the below DAX formula

 

Target:

1. Need the client Distinct Client count. Example: A,B,C...

2. For cleints like "A" it should count the figures mentioned in column Bundle from the data format below.

image.pngimage.png

 

Please let me know if you need further details

REgards,

chandra

Varun

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Based on your requirements, you could create two measures

sum = CALCULATE(SUM(Table1[Bundle]),ALLEXCEPT(Table1,Table1[Client]))

discount = CALCULATE(DISTINCTCOUNT(Table1[Client]),ALL(Table1))

4.png

Best Regards

Maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Based on your requirements, you could create two measures

sum = CALCULATE(SUM(Table1[Bundle]),ALLEXCEPT(Table1,Table1[Client]))

discount = CALCULATE(DISTINCTCOUNT(Table1[Client]),ALL(Table1))

4.png

Best Regards

Maggie

rocky09
Solution Sage
Solution Sage

try this

Table = SUMMARIZE(Table1,Table1[Client],"Total Bundle",SUM(Table1[Bundle]))
Nolock
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

 

there are many options depending on what exactly you expect.

If you need a DAX expression for creating a new table which result is a sum of bundle over client, use GROUPBY:

GroupedTable = 
GROUPBY (
    Table1;
    Table1[Client];
    "Sum Of Bundle"; SUMX ( CURRENTGROUP (); IF ( ISBLANK ( Table1[Bundle] ); 0; Table1[Bundle] ) )
)

Capture.PNG

If you don't care that B, C, D, and E aren't a part of the result because they are BLANK, use the default summarization of Power BI, see screenshot below.

Capture1.PNG

group by cus count.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.