cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
TejasK
Frequent Visitor

Hi,I am trying to design a function so that my slicer acts only in the way I want it to.

TejasK_0-1673306115884.png

 

So I have 3 main groups, Group1, group 2 and group 3. 
At this stage I am inclined towards building a up a matrix visual such that if I select A, then I automatically get 4 measures Group 1 selected which shows value 100, than sum of all the remaining in group 1 which is 900 and then separately also show Group 2 and Group 3. Is this possible? 

 

1 ACCEPTED SOLUTION

@TejasK , not sure why you intend to use distinctcount, is it because you got duplicate in type. I'm attaching PBIX File. Can I see a broader range of dummy datasets to investigate further, ideally PBIX File. Many Thanks PBIX FILE 

View solution in original post

4 REPLIES 4
TejasK
Frequent Visitor

@Manoj_Nair - Thank you for your help. 
I have changed your DAX measures to do a count distinct and GRP1 Selected works fine but GRP1 NotSelected does not work. 
My DAX measures are as follows: 

GRP 1_Selected ( This one works well ) =
var _Type = SELECTEDVALUE(TBL3[TYPE])
return
CALCULATE(distinctcount(TBL3[ID]),FILTER(TBL3,(TBL3[TYPE]) =_Type && (TBL3[GROUP]) = "GROUP 1"))

GRP 1_NotSelected ( This one does not work ) =
var _Type = SELECTEDVALUE(TBL3[TYPE])
return
CALCULATE(distinctcount(TBL3[ID]),FILTER(TBL3,(TBL3[TYPE]) <>_Type && (TBL3[GROUP]) = "GROUP 1"))


The GRP1_NotSelected gives blank result. 



@TejasK , not sure why you intend to use distinctcount, is it because you got duplicate in type. I'm attaching PBIX File. Can I see a broader range of dummy datasets to investigate further, ideally PBIX File. Many Thanks PBIX FILE 

@Manoj_Nair - Thanks Manoj.
While trying to prepare a dummy data set and looking at some of the DAX videos, I was able to achieve what I wanted.
Getting some ideas from your DAX, I also managed to create DAX's for Group 2 and Group 3 asked originally in my post.
Thank you so much for all your help 🙂

Manoj_Nair
Solution Supplier
Solution Supplier

@TejasK - pls try this two DAX

image.jpg

If this post helps to find solution would be happy if you could mark my post as a solution and give it a thumbs up

 

Best regards

Manoj Nair

Linkedin - https://www.linkedin.com/in/manoj-nair-%E2%98%81-344666104/

 

 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors