Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have a table that looks like this:
I want to be able to make a custom filter or slicer that that has 3 options(1,7,28):
if 1 then calculate column ship_visit_1d
if 7 then calculate column ship_visit_7d
if 28 then calculate column ship_visit_28d
I can't for the life of me figure this out, can anyone help?
TIA
Solved! Go to Solution.
Hi @Marshy
1. Create a table with your tree rows 1, 7 and 28.
2 Create Measure:
result =
SWITCH(
SELECTEDVALUE( SelectionTable[selection] ),
1, SUM( table[ship_visit_1d] ),
7, SUM( table[ship_visit_7d] ),
28, SUM( table[ship_visit_28d] )
)
@Marshy , refer if this can help
Rolling 7 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table,today()-7,7,day))
Rolling 7 to 14 day = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD(Table,today()-14,7,day))
7 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
14 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
21 Days behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAY))
Hi @Marshy
1. Create a table with your tree rows 1, 7 and 28.
2 Create Measure:
result =
SWITCH(
SELECTEDVALUE( SelectionTable[selection] ),
1, SUM( table[ship_visit_1d] ),
7, SUM( table[ship_visit_7d] ),
28, SUM( table[ship_visit_28d] )
)
User | Count |
---|---|
117 | |
75 | |
62 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |