Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
puglover
Regular Visitor

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

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!
1 ACCEPTED SOLUTION

 

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

8 REPLIES 8
v-lili6-msft
Community Support
Community Support

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.

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 number:(

 

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

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.

Hi @v-lili6-msft,

 

I have edited my response above. Thanks a lot!

 

Thanks,

Ying

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.

The focus will be 'average audience retention'The focus will be 'average audience retention'This is the related tableThis 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

 

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.
v-lili6-msft
Community Support
Community Support

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.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.