Forum Discussion
Sum unique values daily
- 8 years ago
HI afk
Try this MEASURE
Measure = SUMX ( ALLSELECTED ( Table1[Date] ), CALCULATE ( FIRSTNONBLANK ( Table1[Visits], 1 ) ) ) - 8 years ago
To get figures with correct total...please create another MEASURE which will reference the first MEASURE i.e.
Measure 2 = IF ( HASONEFILTER ( Table1[URL] ), [Measure], SUMX ( ALLSELECTED ( Table1[URL] ), [Measure] ) )
It is a quite common situation to have a wrong Total for a MEASURE in rows and/ or columns
For example see Greg's post
https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/m-p/63376
So we use different formulas for individual rows/columns and total row/column
HASONEVALUE or HASONEFILTER functions help detect if a row is a TOTAL row or not.
We use SUMX to aggregate the measure (used for individual rows) over allrows of the table so that we can get the correct total in the Table Visual
@Zubair_MuhammadZubair_Muhammad
I followed the same formula you've mentioned from this section, however my total seems to be still incorrect.
The total should be 94.35 instead of 75.79.
Link https://drive.google.com/file/d/1jt6kZLgS9KAGaricTLnpGuuTs93N5sDU/view?usp=sharing
Formula I used:
- Anonymous6 years agoNot applicable
Attaching the correct link: https://drive.google.com/file/d/1b6x1Xm7ETijz6-Z7IJLsfBY5VEu76eNs/view?usp=sharing
- Anonymous6 years agoNot applicable
Anyone, who could help please?
Appreciate it, Thanks!