Forum Discussion
OR Logic With Matching count in Power BI Desktop using DAX
- 3 years ago
Thanks for clarifying scenario #2.
Hopefully I am understanding correctly now.
Please create the following 2 measures:
Test Scenario 1 =
Brush & Eggs should return 0 because there are 0 matching Transaction ID's selected.
Test Scenario 2 =
Brush, Eggs & Beer should return 0 because there are 0 matching Transaction ID's selected.
Test Scenario 3 =
Brush, Tooth Paste & Pencil should return 3 because there are 3 matching ID's selected.
In summary, for the 3 scenarios discussed, the Card Visual is returning the desired result; unless I have completely misunderstood yet again.
Let me know if there are other scenarios for which the Card Visual does not return the desired result.
Hope this is helpful to you.
Regards,
Nathan
) If the user selects Brush & Eggs, what should the correct result be? Zero
2) If the user selects Brush, Eggs & Beer, what should the correct result be? Two
3) If the user selects Brush, Tooth Paste & Pencil, what should the correct result be? Three
I guess I was wrong. Still struggling to understand...
1) Brush & Eggs = 0 because there are 0 matches between the 2 transaction IDs?
2) Brush, Eggs & Beer = 2 because ???
Each of these products has a different Transaction ID.
I would think that because there are no matches, this would be 0 also.
Can you help me understand how the result should be 2?
3) Brush, Tooth Paste & Pencil all share the same Transaction ID.
So there are 3 products that share the same matching ID.
I think believe that's why the answer is 3. Is that correct?
- WinterMist3 years agoImpactful Individual
Thanks for clarifying scenario #2.
Hopefully I am understanding correctly now.
Please create the following 2 measures:
Test Scenario 1 =
Brush & Eggs should return 0 because there are 0 matching Transaction ID's selected.
Test Scenario 2 =
Brush, Eggs & Beer should return 0 because there are 0 matching Transaction ID's selected.
Test Scenario 3 =
Brush, Tooth Paste & Pencil should return 3 because there are 3 matching ID's selected.
In summary, for the 3 scenarios discussed, the Card Visual is returning the desired result; unless I have completely misunderstood yet again.
Let me know if there are other scenarios for which the Card Visual does not return the desired result.
Hope this is helpful to you.
Regards,
Nathan
- Sabeer933 years agoFrequent Visitor
Yes.. you are correct. can you help me with the logic
- Take33 years agoRegular Visitor
I am still confused by scenario #2.
IF Brush, Eggs & Beer are selected THEN you're saying the expected result is 2.
This doesn't make sense to me. For this scenario there are zero matching Transaction IDs. In this case, I would expect the result to be "zero".
Can you help me understand how you are calculating the result as "2"?
Regards,
Nathan