Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello,
Data Table -
Customer | Product Ordered |
AAA | Tablet |
AAA | Mobile |
AAA | Mouse |
BBB | Mobile |
BBB | Mouse |
CCC | Mobile |
DDD | Tablet |
I'm trying to create a measure that gives me below output, it seems pretty easy one but not able to figure out what DAX statements to use, any advice or help on this would be appreciated. Thanks
Desired Output -
Customers ordering multiple products | Customer Ordering Mobile Only | Customer Ordering Tablet Only |
AAA | CCC | DDD |
BBB |
Solved! Go to Solution.
Hi, @Anonymous
Please correct me if I wrongly understood your question.
Please check if the below picture is what you are looking for.
The sample pbix file's link is down below, and all measures are written in the file.
https://www.dropbox.com/s/3zcylylytidjsn6/Mrugankjoshi.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, @Anonymous
Please correct me if I wrongly understood your question.
Please check if the below picture is what you are looking for.
The sample pbix file's link is down below, and all measures are written in the file.
https://www.dropbox.com/s/3zcylylytidjsn6/Mrugankjoshi.pbix?dl=0
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Exactly what I was looking for, appreciate your help! 👍정말 감사합니다
Hey @Anonymous ,
you can try that with the following measures:
For the multiple products:
Customers ordering multiple products =
VAR vCustomers =
FILTER (
ADDCOLUMNS (
VALUES ( MyTable[Customer] ),
"NumberSales", CALCULATE ( COUNTROWS ( MyTable ) )
),
[NumberSales] > 1
)
RETURN
SUMX(vCustomers, [NumberSales])
The amount of mobile:
Customer Ordering Mobile Only =
CALCULATE(
COUNTROWS( MyTable ),
MyTable[Product Ordered] = "Mobile"
)
And tablet:
Customer Ordering Tablet Only =
CALCULATE(
COUNTROWS( MyTable ),
MyTable[Product Ordered] = "Tablet"
)
The result looks then like that:
Thank you, that was helpful 👍
User | Count |
---|---|
106 | |
89 | |
81 | |
76 | |
73 |
User | Count |
---|---|
112 | |
104 | |
96 | |
74 | |
66 |