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.
In the I just distinctcount one of the column but in matrix the total is incorrect
Single Table Sales_transaction
columns : Customer Key , Document type , Net Amount
Dax :
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Solved! Go to Solution.
Hi @mh2587 ,
Please try calculating the value of the total column separately.
SUMX(ALLSELECTED(table),[Customer Deliveries])
Use ISINSCOPE() function to determine whether it is a total column and return different value.
measure = IF(ISINSCOPE([Column filed]),[Customer Deliveries],SUMX(ALLSELECTED(table),[Customer Deliveries]))
If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
Single Table Sales_transaction
columns : Customer Key , Document type , Net Amount
Dax :
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
Hi @mh2587 ,
Please try calculating the value of the total column separately.
SUMX(ALLSELECTED(table),[Customer Deliveries])
Use ISINSCOPE() function to determine whether it is a total column and return different value.
measure = IF(ISINSCOPE([Column filed]),[Customer Deliveries],SUMX(ALLSELECTED(table),[Customer Deliveries]))
If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
@mh2587 This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
@mh2587 , Distinctcount can be different in grand total. As that is not sum of rows
Other wise force it using the column in visual
sumx(addcolumns(summarize(Table, Table[Column]), "_1", distinctcount(Table[Col2])), [_1])
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
@mh2587 Is your table visual also summarized by CUSTOMER_KEY only? As in, you only have CUSTOMER_KEY column and Deliver 2 measure in your table? I would do it this way:
Customer Deliveries 2.1 =
var table_ = SUMMARIZE(SALES_DOCUMENTS, SALES_DOCUMENTS[CUSTOMER_KEY],
"Deliveries", [Delivery 2])
RETURN
IF(HASONEVALUE(SALES_DOCUMENTS[CUSTOMER_KEY]),[Delivery 2],SUMX(table_,[Deliveries]))
So use your existing measure that you know works for individual lines.
Still I get the same result not working
Did I answer your question? If so, please mark my post as a solution!
Proud to be a Super User!
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 |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |