Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello All,
I am new and learning PowerBI, and have been stuck with something and i hope someone may be able to shine a light 🙂
I have a table that has a list of customers and several columns (one per product) that shows whether the customer purchased the specific items. My goal is to be able to use a slicer and select the customer, and on the visualization would show the customer overall business information, i was able to achieve a lot of what i need, but i wanted to show the "biggest opportunity" for that customer, showing in a list the items showing as "0" or blank (they did not purchase). I tried using Matrix or a table, but shows the product names with values below, i wanted it in a list format (1 product per row) without any number, only showing items that did not show any sales. Is there a way to achieve this?
Thank You!
Solved! Go to Solution.
This depends on the structure of your data. If you had a table with the items that have been purchased, and a list of all items, you could do something like:
CALCULATE(
COUNTROWS(
EXCEPT(SELECTCOLUMNS([all_items]), SELECTCOLUMNS([purchased_items])
)
)(note: i haven't tested this code) But the idea is that you want to get all of items that haven't been purchased and then ignore all of the ones that have been purchased. Here's the docs on the EXCEPT function: https://learn.microsoft.com/en-us/dax/except-function-dax
This depends on the structure of your data. If you had a table with the items that have been purchased, and a list of all items, you could do something like:
CALCULATE(
COUNTROWS(
EXCEPT(SELECTCOLUMNS([all_items]), SELECTCOLUMNS([purchased_items])
)
)(note: i haven't tested this code) But the idea is that you want to get all of items that haven't been purchased and then ignore all of the ones that have been purchased. Here's the docs on the EXCEPT function: https://learn.microsoft.com/en-us/dax/except-function-dax
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 56 | |
| 40 | |
| 36 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 74 | |
| 72 | |
| 38 | |
| 35 | |
| 26 |