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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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