Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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! |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
9 | |
7 | |
6 | |
5 |
User | Count |
---|---|
20 | |
11 | |
10 | |
9 | |
6 |