Forum Discussion
Periods parameter for user flexibility
- 1 year ago
hello Sammy22
the best way is using filter pane as mentioned by lbendlin .
if you want tricky way, here is an example of what i did for my project.
1. create a duplicate table of your original table, something like this.
Table 2 = 'Table'
2. create P1 and P2 measure which P1 takes value from original table and P2 takes value from duplicated table.P1 =
IF(
ISFILTERED('Table'),
SUM('Table'[Orders])
)P2 =
IF(
ISFILTERED('Table 2'),
SUM('Table 2'[Orders])
)3. plot your slicer and measure. similarly as above, slicer 1 from original table and slicer 2 from duplicated table.Hope this will help.
Thank you.
hello Sammy22
the best way is using filter pane as mentioned by lbendlin .
if you want tricky way, here is an example of what i did for my project.
1. create a duplicate table of your original table, something like this.
Table 2 = 'Table'
P1 =
IF(
ISFILTERED('Table'),
SUM('Table'[Orders])
)
P2 =
IF(
ISFILTERED('Table 2'),
SUM('Table 2'[Orders])
)
Hope this will help.
Thank you.
- Sammy221 year agoHelper I
thanks for your help! What if i also want to group by a field that exists in both tables. If i select a field from Table 1 then the orders will be broken down for Table 1 (P1) only and Table 2 (p2) Orders will just show a total.
- Irwan1 year agoSuper User
hello Sammy22
i might be misunderstood but if you mean by "group by a field" is calculation result from selecting field, then you can add your field as filter so it will calculate each of those fields.
something like this, calculate(sum('Table'[Orders]),filter(allselected('Table'),'Table[Field]=.....))
otherwise, please share your sample data and your desired outcome.
Thank you.
- Sammy221 year agoHelper I
Thanks for your help. It would be like the below where there are can be up to 40 different countries. I would be summing up the orders by country by period.