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.
Hi everyone, I cannot understand why the total does not SUM correctly.
In the following table I am making measurements of:
Id_Name = Distinctcount (Table1 [Id_Name]) ... OK
Sales Check = Distinctcount (Table1 [Id_SalesCheck]) ... OK
here I can not show what is seen in the table.
2 or more Purchas = If (Sales Check > 1, Distinctcount (Table1 [Id_Name]), BLANK())
I tried SUMX but the result was an out-of-itself number.
SUMX (Table1, Distinctcount (Table1 [Id_Name]))
I try to do my best but I'm really frustrated, I need help
This next table make in Excel and Show how I want to see, really I want to correctly sum total.
Solved! Go to Solution.
Hi , @GKs
Please check this sample file:
pbix attached
Try measure as below:
Measure = SUMX(VALUES('Table1'[Id_Name]),'Table1'[2 or more Purchas])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi , @GKs
Please check this sample file:
pbix attached
Try measure as below:
Measure = SUMX(VALUES('Table1'[Id_Name]),'Table1'[2 or more Purchas])
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@GKs , Try like
countx(filter(summarize(Table1,Table1[id],"_1",[Sales Check]),[_1]>1),[id])
Basically, there's a filter context on each row of your table, e.g. ID_Name = 1 is the filter context on your first row. But the issue is with the Total as there's no such filter on that.
Here you can try use HASONEVALUE to check if Id_name has single value. If it's return false, it means you are on "Total" row, which means there's no Id_name filter on that and it returns all values.
I might suggest you take a look below, which might help.
Try something like this:
Measure 2 =
COUNTX(
FILTER('Table',
'Table'[Sales Check] > 1
),
'Table'[Sales Check]
)
The issue is your measure works fine and it is doing what you asked. Remember measures are recalculated for every place they are used. The total lines do not have a different formula that just sums what is above it. It recalculates the measure based on the filter context of where it is, which is the total line with no filters for the ID. So, in your total, the measure is recalculating and doing this:
If you need further help, please post usable data via the links below. We cannot use images for data samples.
How to get good help fast. Help us help you.
How to Get Your Question Answered Quickly
How to provide sample data in the Power BI Forum
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering 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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |