Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a table with month,activity and value columns.
| Month | Activity | Value | ValueTotal |
| Jan | A | 9212 | 17282 |
| Jan | A | 9212 | 17282 |
| Jan | B | 5746 | 17282 |
| Jan | B | 5746 | 17282 |
| Jan | C | 1752 | 17282 |
| Jan | C | 1752 | 17282 |
| Jan | D | 572 | 17282 |
| Jan | D | 572 | 17282 |
| Feb | A | 25096 | 59342 |
| Feb | A | 25096 | 59342 |
| Feb | B | 23650 | 59342 |
| Feb | B | 23650 | 59342 |
| Feb | C | 7109 | 59342 |
| Feb | C | 7109 | 59342 |
| Feb | D | 3487 | 59342 |
| Feb | D | 3487 | 59342 |
| Mar | A | 27083 | 68068 |
| Mar | A | 27083 | 68068 |
| Mar | B | 28860 | 68068 |
| Mar | B | 28860 | 68068 |
| Mar | C | 6852 | 68068 |
| Mar | C | 6852 | 68068 |
| Mar | D | 5273 | 68068 |
| Mar | D | 5273 | 68068 |
I would like to have calculated column to sum on distinct Value based on month coulumn,
the result expected is of ValueTotal column
i was able to take the distinct value and sum but unable to add filter on month before sum
ValueTotal= SUMX(SUMMARIZE('Table1','Table1'[Value]),'Table1'[value])
Solved! Go to Solution.
Hi, @sheenajose , you might want to try this formula in a calcaulated column,
TotalDistinctValue =
SUMX (
CALCULATETABLE (
DISTINCT ( 'Table1'[Value] ),
ALLEXCEPT ( 'Table1', 'Table1'[Month] )
),
'Table1'[Value]
)
or equally,
TotalDistinctValue 2 =
SUMX (
CALCULATETABLE (
DISTINCT ( Table1[Value] ),
FILTER ( Table1, [Month] = EARLIER ( Table1[Month] ) )
),
Table1[Value]
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi, @sheenajose , you might want to try this formula in a calcaulated column,
TotalDistinctValue =
SUMX (
CALCULATETABLE (
DISTINCT ( 'Table1'[Value] ),
ALLEXCEPT ( 'Table1', 'Table1'[Month] )
),
'Table1'[Value]
)
or equally,
TotalDistinctValue 2 =
SUMX (
CALCULATETABLE (
DISTINCT ( Table1[Value] ),
FILTER ( Table1, [Month] = EARLIER ( Table1[Month] ) )
),
Table1[Value]
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 20 | |
| 11 | |
| 10 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 34 | |
| 32 | |
| 19 | |
| 12 | |
| 10 |