Forum Discussion
Maximous89
9 months agoHelper I
TREATAS
Hello sharks, i have tow columns inside one table (HIER[LEVEL_3_DESC],HIER[LEVEL_5_DESC]), they both have same valus as data points which is manufacturer name but with diffrent filter of H1 an...
- 9 months ago
Hi Maximous89 ,
You can use use treatas to achieve your required output.
Since LEVEL_5_DESC (from H1) contains the values you want to map to LEVEL_3_DESC (in H3), treatas is the function which can move that lineage.
Here is the refined measure.
Tested Solution = VAR _SelectedLevel5 = VALUES(HIER[LEVEL_5_DESC]) RETURN CALCULATE( [Avg of HANDNP], REMOVEFILTERS(HIER), -- Remove existing context from the visual HIER[AC_HIERARCHY_CODE] = "H3", -- Force the calculation to look at H3 HIER[HLEVEL] = "MANUFACTURER", -- Ensure we are looking at the right level type TREATAS( _SelectedLevel5, -- Take the selection from the visual (e.g., "Toyota" from Level 5) HIER[LEVEL_3_DESC] -- Apply it as a filter to Level 3 ) )The resultant output is as shown below:
I have attached an example pbix file.
Best regards,
Anonymous
9 months agoNot applicable
Hi Maximous89 ,
Thank you for reaching out to the Microsoft Fabric Community Forum.
Could you please let us know if the issue has been resolved? I wanted to check if you had the opportunity to review the information provided by DataNinja777 and Shubham_rai955 . If you still require support, please let us know, we are happy to assist you.
Thank you.