Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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?
User | Count |
---|---|
11 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
19 | |
16 | |
10 | |
7 |