cancel
Showing results for
Did you mean:

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

Helper IV

## Return Value of respective OG

Hi !
Refer Pic:-
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...

1 ACCEPTED SOLUTION
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] )
)``````

4 REPLIES 4
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] )
)``````

Helper IV

Hi @m3tr01d ,

Thanks a ton!

It worked 💯🎉

Super User

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

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Helper IV

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