Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello, I am struggling to write a measure that does the following:
In one data table, I have a total inventory column, a sales channel column that identifies where the inventory is located and I have a column that identifies the Part Number inventory that is currently available . I have a reference table that also contains Part Number, but it also contains more information about the part number, like Part Group, Part Class, etc. The two tables have a relationship using Part Number. What I am trying to do is count the number of part groups by sales channel. I am not very experienced using DAX or measures, so any guidance and information about how I might achieve this goal is much appreciate.
Additionally, the data table that contains the sales information is labeled INVENTORY and the table that contains all of the additional references to the Part Number is labeled Ref_Material. There is a many to one relationship going from the INVENTORY table to the Ref_Material table. I am not very experienced using DAX or measures, so any guidance and information about how I might achieve this goal is much appreciated.
Solved! Go to Solution.
Hi,
If you have a relationship between the tables you don't necessarily need DAX. You can select count distinct here and you will get the result you want:
My test data:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
If you have a relationship between the tables you don't necessarily need DAX. You can select count distinct here and you will get the result you want:
My test data:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
7 |