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.
Hi All,
Below are my tables, Order table and Cart table are related by Order ID. Cart and Message tables are related by Cart ID.
My requirement is to count the number of Orders by messages. I am expecting below output:
Number of Orders | Messages |
2 | Your order is not correct |
Can anyone help me how to get this output in DAX ?
Regards,
Shiva Kumar
Solved! Go to Solution.
Hi @ncbshiva
If you use the [Order ID] column from Cart table and use the aggregate type Count (or Count Distinct), you will get the result directly.
Or you can also create a measure Measure1 = COUNT(Cart[Order ID]) or Measure1 = DISTINCTCOUNT(Cart[Order ID]) and put it in the table.
Hi @ncbshiva
If you use the [Order ID] column from Cart table and use the aggregate type Count (or Count Distinct), you will get the result directly.
Or you can also create a measure Measure1 = COUNT(Cart[Order ID]) or Measure1 = DISTINCTCOUNT(Cart[Order ID]) and put it in the table.
@ncbshiva , Hop message, and cart are joined
ithink count should do
calculate(count(cart[order id] , not(isblank(Message[cart id])))
if needed
calculate(distinctcount(cart[order id] , not(isblank(Message[cart id])))
visualize with Message[Message]
Hi,
Thanks for the message.
As mentioned Cart and Message table is joined/related by Cart ID.
I tried the dax that you have provided, but i did not get the expected results.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |