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
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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 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.