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
souvik900766
Helper IV
Helper IV

Return Value of respective OG

Hi !
Refer Pic:-
File Link:-     https://www.dropbox.com/s/gp3nc7o5cdi6bfy/eg.pbix?dl=0
I want to return the global category number OG wise, which I am getting correct in Table 1  and for Table 2 i want to filter the concatenated colum (OGXCategory) based on category Slicer selection and the number it should return is of respective OG that is present in Table 1 .
For e.g. in Table 2 for
APAC COLA I want to return 54, 
EMEA COLA I want to return 65...
If i select RTD Tea then also for
APAC RTD Tea I want to return 54, 
EMEA RTD Tea I want to return 65...
Capture.PNG

Thanks in advance !

1 ACCEPTED SOLUTION
m3tr01d
Continued Contributor
Continued Contributor

Hello,

you'll need to restore the original filter context on the OG Short column. To do this, you can use the VALUES function. Also, you can include all the columns in the Same All function.

OGXCat Category Base = 
CALCULATE(
    SUM(Sheet3[CY])/100000,
    ALL(Sheet3[Ctgry Nomen], Sheet3[New Category Defination], Sheet3[OGXCat]),
    VALUES( Sheet3[OG Short] )
)


Hope this solve your issue

View solution in original post

4 REPLIES 4
m3tr01d
Continued Contributor
Continued Contributor

Hello,

you'll need to restore the original filter context on the OG Short column. To do this, you can use the VALUES function. Also, you can include all the columns in the Same All function.

OGXCat Category Base = 
CALCULATE(
    SUM(Sheet3[CY])/100000,
    ALL(Sheet3[Ctgry Nomen], Sheet3[New Category Defination], Sheet3[OGXCat]),
    VALUES( Sheet3[OG Short] )
)


Hope this solve your issue

Hi @m3tr01d ,

Thanks a ton!

It worked 💯🎉

Greg_Deckler
Super User
Super User

@souvik900766 You are almost certainly missing a relationship between the table used for the slicer and your second table.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

No I am not using any other table...it's a single table

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.