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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
RaffaBs
New Member

Filter a distinct count with a slicer

Hi,

 

I have this database,

 

Date

   Account ID

   Volume

04/01/2021

   A1234

   5

04/05/2021

   A1235

   2

04/15/2021

   A1236

   5

04/15/2021

   A1234

   5

04/27/2021

   A1236

   2

05/03/2021

   A1236

   10

05/10/2021

   A1234

   5

05/20/2021

   A1237

   2

05/30/2021

   A1235

   5

05/31/2021

   A1236

   2

06/04/2021

   A1234

   10

06/12/2021

   A1237

   2

06/22/2021

   A1235

   20

 

And I am using it the following way in Power BI,

 

RaffaBs_0-1637860133401.png

 

 

Since it is not possible to make a slicer for volume in a direct way, due to the base I use, I needed to perform the sequence of actions below:

 

1- Create a table that generates values from 0 up to the sum value of the volume (Volume Measure)

 

RaffaBs_1-1637860133404.png

 

2- Create the slicer with this table

 

RaffaBs_2-1637860133408.png

 

3 - Create a measure to filter the visual table, so that it shows only the information selected in the slicer volume

 

RaffaBs_3-1637860133410.png

 

4 - Create a measure to filter the volume slicer, making the maximum and minimum of the slicer according to the volumes of the IDs

 

RaffaBs_4-1637860133414.png

 

 

This way the volume slicer can filter the visual table correctly.

But when the volume slicer is changed, the distinct count of Account IDs is not changed.

And somehow Power BI does not allow me to use the same filter that I applied on the visual table.

 

I need to make the volume slicer filter out the distinct count of Account IDs. Can someone please help me?

 

Regards,

 

Rafael B.

1 ACCEPTED SOLUTION

Oh, I missed this step

 

 "Create a table that generates values from 0 up to the sum value of the volume (Volume Measure)"

 

You cannot create a measure table. You can only create a calculated table - that is calculated only once, during data source refresh, and cannot be influenced by the user.

Measure results need to be scalar values.

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

The distinct count of Account IDs is in a different visual. You need to apply the same filter to that visual, or set the filter to be page level.

I tried the two solutions you proposed, but Power BI didn't allow it and I don't know why.

Oh, I missed this step

 

 "Create a table that generates values from 0 up to the sum value of the volume (Volume Measure)"

 

You cannot create a measure table. You can only create a calculated table - that is calculated only once, during data source refresh, and cannot be influenced by the user.

Measure results need to be scalar values.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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