Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I figured it out finally. thank you.
So I was thinking more of the logic and I believe I need an IF statement maybe?
Since in 1 single project 2 materials may be producing 2 brandcodes and I do want to count the number of brand codes if it is in a different project...
could you help me somehow incorporate this -
And I am not sure if I need to specify anything about the materials.
I just don't want to count 2 brandcodes if that brandcode belongs to 2 different materials & is in the same project. I don't want to include materials as a way to count, but it is what is causing the calculation to be off.
Would I use ALLEXCEPT maybe?
Would I use ALLEXCEPT maybe?
If projectid = project id, then count distinct (do not want duplicate brandcodes)
If project id <> project id, then count all (including duplicate brandcodes)
I am trying to get the total number of non-blank brandcodes in a table.
Unfortunately, everything I tried, either gives me the distinct count OR gives me a number that is higher the actual number (which appears to be linked to the columns that are a lower hierarchy in the matrix - the part #s). But I am not sure why it is including those because they are not a part of the column I am focusing on.... including snapshot of this...
The result should be 11. But I either get 10 (because this would be true if it were distinct. However, I dont want distinct).
OR I get 16 because as mentioned earlier it is including another column in the calculation for some reason.
Below is one of the things I tried, however this gives me 10 and it should be 11 because I have the same brandcode that is in a differernt project ID #...
count BC =
SUMX(
VALUES('PCMerge'[brandcodes]),
IF('PCMerge'[brandcodes] <> BLANK(), 1, 0))
TestCountBrandCodes =
VAR SummaryTable =
ADDCOLUMNS ( VALUES ( 'PCMerge'[brandcodes]), "@value", [count BC])
RETURN
SUMX(SummaryTable, [@value])
Hi @NeverGiveUp
You need to calculate the distinct count of brandcodes per project id, then sum all of them.
count BC =
SUMX (
VALUES ( 'PCMerge'[Project ID] ),
DISTINCTCOUNT ( 'PCMerge'[brandcodes] )
)
Hope this helps.
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Unfortunately this gave me 60 ??
So I was thinking more of the logic and I believe I need an IF statement maybe?
Since in 1 single project 2 materials may be producing 2 brandcodes and I do want to count the number of brand codes if it is in a different project...
could you help me somehow incorporate this -
And I am not sure if I need to specify anything about the materials. I just don't want to count 2 brandcodes if that brandcode belongs to 2 different materials & is in the same project. I don't want to include materials as a way to count, but it is what is causing the calculation to be off.
Would I use ALLEXCEPT maybe?
If projectid = project id, then count distinct (do not want duplicate brandcodes)
If project id <> project id, then count all (including duplicate brandcodes)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
85 | |
66 | |
51 | |
45 |
User | Count |
---|---|
216 | |
89 | |
82 | |
66 | |
57 |