Reply
Frequent Visitor
Posts: 4
Registered: ‎12-19-2018
Accepted Solution

Show related result for all available options in slicer 1 disregard the choices in slicer 2

[ Edited ]

I'm creating a dashboard to compare the result in brand level and campaign level. There will be 2 levels of filtering, the 1st slicer filters the brand while the 2nd one will base on the brand selected in the 1st slicer and display all available campaigns.

I need to have 2 sets of results, which one will just show those for brand level, no matter what has been chosen in the 2nd filter. The other set will be down to campaign level. 

 

I encounter a problem with the brand level set result. I'm trying to use the below Measure:

 

Brand AVG Impression = CALCULATE(
AVERAGE(Table1[Impressions]),
FILTER(Table1,Table1[Brand] = [Selected campaign]))
 
to restrict the result for only the 1st slicer. It works in most of the results, except one that is showing in line chart and with the percentage. I'm not sure whether these are related or if anyone has other measures that could fit my need?
 
Thanks!

Accepted Solutions
Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

 

HI, @puglover

Assume that these are two data table and they a relationship by column ID

6.JPG7.JPG8.JPG

 

If you just don't want "campaign name' slicer  to  affect the measure

you can create a measure as below:

 

Measure = CALCULATE(AVERAGE(Table1[Qty]),ALL(Table2[campaign name]))

Result:

9.JPG10.JPG

If not your case, please create a sample pbix file with virtual data, this will be a great help on this issue.

 

and I think you'd better have a learn on ALL/ ALLEXCEPT Function

https://docs.microsoft.com/en-us/dax/all-function-dax

https://docs.microsoft.com/en-us/dax/allexcept-function-dax

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

Best Regards,

Lin

 

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post


All Replies
Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

HI, @puglover

You could use ALL-function in your measure like:

Brand AVG Impression = CALCULATE(
AVERAGE(Table1[Impressions]),
FILTER(ALL(Table1),Table1[Brand] = [Selected campaign]))

 

and here is a blog for you as a reference:

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

If it is not your case, please share some data sample and expected output. Do mask sensitive data before uploading.

 

 

 

Best Regards,

Lin

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

hi, @puglover

Could you please tell me if your problem has been solved? If it is, could you please mark the helpful replies as Answered?

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor
Posts: 4
Registered: ‎12-19-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

[ Edited ]

Hi @v-lili6-msft,

 

Just found out that It acutally shows all the results in slicer 1 no matter what I choose in slicer 1, which that shouldn't be the case as I only need the slicer 1 chosen options to be shown disregarding the one in slicer 2.

 

And the format has been set in % but still shown as decimal numberSmiley Sad

 

Sorry as I'm quite new to this, do you mind sharing the method in masking the data so I could share that with you?

 

Thanks,

ying

Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

hi, @puglover

Select the measure then click Modeling->Formatting to set format as below.

2.JPG

 

Best Regards,
Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor
Posts: 4
Registered: ‎12-19-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

Hi @v-lili6-msft,

 

I have edited my response above. Thanks a lot!

 

Thanks,

Ying

Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

hi, @puglover

please share your sample pbix file or some data sample and expected output. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor
Posts: 4
Registered: ‎12-19-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

Power BI community 1.PNGThe focus will be 'average audience retention'Power BI community 2.PNGThis is the related table

Hi @v-lili6-msft,

 

Above are the 2 screenshots that taken from my file.

 

In the first picture, There's a line chart showing the average audience retention, the dark one is the one with the problem which it shows the same average for "25%, 50%, 70% and VCR%". This is assuming the line will just move based on the selection on the "brand' slicer no matter what other options are taken in "campaign name' slicer. 

 

The second picture is showing the table that I created separately for this graph. (There should be correlated brands under the brand column but I have hided those).

 

Please let me know if this could help better understand my needs. Thanks a lot! 

 

Best,

Ying

Community Support Team
Posts: 1,340
Registered: ‎07-30-2018

Re: Show related result for all available options in slicer 1 disregard the choices in slicer 2

 

HI, @puglover

Assume that these are two data table and they a relationship by column ID

6.JPG7.JPG8.JPG

 

If you just don't want "campaign name' slicer  to  affect the measure

you can create a measure as below:

 

Measure = CALCULATE(AVERAGE(Table1[Qty]),ALL(Table2[campaign name]))

Result:

9.JPG10.JPG

If not your case, please create a sample pbix file with virtual data, this will be a great help on this issue.

 

and I think you'd better have a learn on ALL/ ALLEXCEPT Function

https://docs.microsoft.com/en-us/dax/all-function-dax

https://docs.microsoft.com/en-us/dax/allexcept-function-dax

https://www.sqlbi.com/articles/managing-all-functions-in-dax-all-allselected-allnoblankrow-allexcept...

 

Best Regards,

Lin

 

 

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.