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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Power BI "Table" (distinct rows) should depend on Slicers selection

Hi,

I have a sample data with 256 rows & 16 columns. With all columns , I want to create a table (not "Matrix") that should depend on Slicers & other visualizations.
"Code" column has duplicate values. We have to create table with all columns that should show distinct rows based on "Code" column distinct values. "Color" & "Category" are Slicers. 

 

sample criteria 1) if no filters on Slicers,

table should show 49 distinct rows ("Code" distinct values)

sample criteria 2) if Color = black & Category = bikes

then table should show 10 distinct rows (based on "Code" distinct values)

sample criteria 3) if Color = Red & Yellow (and) Category = "Components"

then table should show 10 distinct rows 

Bar chart.png

We have a bar chart based on "Class" column items (H, L, M) distinct count (based on "Code" distinct values.)
sample criteria 4) If we select any single bar (Ex: "M") on bar chart then table should show 13 distinct rows related to that Bar (Class) "M"


Note: As there is no upload file option, I couldn't upload the sample file.

2 REPLIES 2
isabella
Microsoft Employee
Microsoft Employee

Hi @Anonymous 

The first 3 criteria is easy to get.

In the criteria 4,you need to use a measure =  DISTINCTCOUNT('table'[CODE]) as the value of the bar chart

And when you select the bar ,you need to clear the selection on the color and category slicers first.

isabella_0-1654675492769.png

 

 

Best Regards,

Community Support Team _Isabella

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

Ashish_Mathur
Super User
Super User

Hi,

Write this measure and drag it to your visual

Measure = distinctcount(Data[Code])

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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