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
This is what my data looks like:
Please note this is just for category A. I have other categories as well. But all of them have channels and date and total orders etc. I want to calculate weekly sum for each category. However, I want to discount channel. I would like to show it in visual but the value of sum should be constant for all.
In the above case. 524+532+499+412+617 = 2584
I have this DAX:
Weekly Notification Sum =
VAR _max = MAXX(all(Consolidated), Consolidated[ Channel])
VAR _min = MAXX(ALL(Consolidated), Consolidated[Channel])
RETURN
CALCULATE(
SUM(Consolidated[Nudges]),
FILTER(Consolidated, Consolidated[ Channel] = _min || Consolidated[ Channel] = _max )
)
This one ofcourse doenst give me correct value. It takes max of each channel and then gives me that.
Tried many things but I am extremely clueless.
Edit:
This solution works fine until I add another column Channel into context.
Weekly Notification Sum =
VAR _Distinct_ =
SUMMARIZE (
Consolidated,
Consolidated[Type],
Consolidated[Date],
Consolidated[Total notifications]
)
RETURN
SUMX ( _Distinct_, Consolidated[Total notifications] )
To avoid counting the value multiple times, you can group the relevant columns before summing.
For example:
Weekly Notification Sum =
VAR _Distinct_ =
SUMMARIZE (
Consolidated,
Consolidated[Type],
Consolidated[Date],
Consolidated[Total notifications]
)
RETURN
SUMX ( _Distinct_, Consolidated[Total notifications] )
How do I make it not get affected by channel in the visual? When I add Channel it shows a different sum for each channel. I want it to show 2584 for all channels.
One approach would be to remove all filter context except the columns you're summarizing.
Try this, for example:
Weekly Notification Sum =
VAR _Distinct_ =
CALCULATETABLE (
SUMMARIZE (
Consolidated,
Consolidated[Type],
Consolidated[Date],
Consolidated[Total notifications]
),
ALLEXCEPT (
Consolidated,
Consolidated[Type],
Consolidated[Date],
Consolidated[Total notifications]
)
)
RETURN
SUMX ( _Distinct_, Consolidated[Total notifications] )
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 |
|---|---|
| 65 | |
| 46 | |
| 44 | |
| 28 | |
| 19 |
| User | Count |
|---|---|
| 198 | |
| 125 | |
| 102 | |
| 69 | |
| 53 |