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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Here's my custom column:
Solved! Go to Solution.
Hi @fergu513 ,
You can try:
Ext. Sales PY =
VAR MinRC = MIN(Transactions[Retained Control])
VAR MaxRC = MAX(Transactions[Retained Control])
VAR AllZero = MinRC = 0 && MaxRC = 0
VAR AllOne = MinRC = 1 && MaxRC = 1
RETURN
SWITCH(
TRUE(),
AllZero, BLANK(),
AllOne,
CALCULATE(
[03Total_Sales_PY],
Transactions[Whse_Type] = "Branch",
Transactions[Retained Control] = 0 ||
Transactions[ACQUISITION_YR] = 0 ||
ISBLANK(Transactions[ACQUISITION_YR])
),
BLANK()
)
Hope this helps!
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @fergu513 ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @fergu513 ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @fergu513 ,
Just wanted to check if you had the opportunity to review the suggestions provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @fergu513 ,
You can try:
Ext. Sales PY =
VAR MinRC = MIN(Transactions[Retained Control])
VAR MaxRC = MAX(Transactions[Retained Control])
VAR AllZero = MinRC = 0 && MaxRC = 0
VAR AllOne = MinRC = 1 && MaxRC = 1
RETURN
SWITCH(
TRUE(),
AllZero, BLANK(),
AllOne,
CALCULATE(
[03Total_Sales_PY],
Transactions[Whse_Type] = "Branch",
Transactions[Retained Control] = 0 ||
Transactions[ACQUISITION_YR] = 0 ||
ISBLANK(Transactions[ACQUISITION_YR])
),
BLANK()
)
Hope this helps!
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi @fergu513 ,
Force SELECTEDVALUE to return 0 if all values are 0.
VAR SelectedRC =
IF(
HASONEVALUE(Transactions[Retained Control]),
VALUES(Transactions[Retained Control]),
IF(
MIN(Transactions[Retained Control]) = 0 && MAX(Transactions[Retained Control]) = 0,
0,
BLANK()
)
)
Then update your switch function.
Hope this helps!
If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You!
RETURN
SWITCH(
TRUE(),
SelectedRC = 0,
BLANK(),
SelectedRC = 1,
CALCULATE(
[03Total_Sales_PY],
Transactions[Whse_Type] = "Branch",
Transactions[Retained Control] = 0 ||
Transactions[ACQUISITION_YR] = 0 ||
ISBLANK(Transactions[ACQUISITION_YR])
),
TRUE(), // default case
BLANK()
)
Hi, this didn't work.
When I filter the measure for retained control = 0, it seems that some row instances get caught by the 0 part of the switch statment, and some get caught by the "not hasonevalue" part of the switch statement.
How do i make it so that every single row instances gets caught by the 0 part of the switch statement when I filter for retained control = 0?
Hi @fergu513 ,
Just wanted to check if you had the opportunity to review the suggestion provided?
If the response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank You
Hi, it did not work. Still need help
@fergu513 , Try using
DAX
Ext. Sales PY =
VAR SelectedRC = SELECTEDVALUE(Transactions[Retained Control])
VAR Base = CALCULATE(
[03Total_Sales_PY],
Transactions[Whse_Type] = "Branch"
)
RETURN
SWITCH(
TRUE(),
NOT HASONEVALUE(Transactions[Retained Control]),
Base, -- Handle grand total / no filter
SelectedRC = 0,
BLANK(),
SelectedRC = 1,
CALCULATE(
[03Total_Sales_PY],
Transactions[Whse_Type] = "Branch",
Transactions[Retained Control] = 0 ||
Transactions[ACQUISITION_YR] = 0 ||
ISBLANK(Transactions[ACQUISITION_YR])
),
BLANK() -- Default case to handle any unexpected scenarios
)
Proud to be a Super User! |
|
Thanks for the reply.
What is different about this DAX from what I originally posted?
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 19 | |
| 11 | |
| 10 | |
| 6 | |
| 6 |