cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
dhannaa
Helper IV
Helper IV

Dynamic conditional usage of dimension tables

Hi all,

I'm trying find the best solution for filtering accounting data based on different custom groupings.

I currenly have this kind of parameter table for groupings. 

dhannaa_0-1643189242839.png



And these dimension tables to tell how to read accounting data into those groups.

dhannaa_1-1643188633254.png

 

And below is how the grouping of the data should happen.

dhannaa_2-1643188662935.png

 

What would be the best way to find the total amount for each individual group? As there should be no usage of filtering table if selected group has zero rows for the dimension table in question. For example, as Group1 uses only account numbers, it should ignore the dimension tables for cost centers and Grouping DimX.

Thanks in advance, I'm a bit stuck as my ideas don't seem to work as I want.

Grouping  
   
Groupd IDGroup 
1Group1Filtered only by Accounts
2Group2Filtered by Accounts And Cost Centers
3Group3Filtered by Accounts And Cost Centers
4Group4Filtered by Accounts and Dimensions

 

Grouping Account 
  
AccountGrouping
50001
50011
50021
50031
50041
50052
50062
50072
50053
50063
50073
50104
50114
50124

 

Grouping Cost Centers 
  
CostCenterGrouping
12
23

 

Grouping DimX 
  
DimensionGrouping
14

 

Accounting Data    
     
AccountCostCenterDimXAmount 
50001150,00 €Group1
500122100,00 €Group1
500232200,00 €Group1
500342300,00 €Group1
50045150,00 €Group1
500512100,00 €Group2
500613200,00 €Group2
500714300,00 €Group2
500525300,00 €Group3
50062650,00 €Group3
500723100,00 €Group3
5010121200,00 €Group4
5011131300,00 €Group4
501214150,00 €Group4





1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @dhannaa ,

Please refer to my steps to see if it helps you.

Create relationships between the three tables.

vpollymsft_0-1643697717670.png

Then create a measure.

balance = 
IF(SELECTEDVALUE(Table_3[Dimension])=1,"Group4",IF(SELECTEDVALUE(Table_1[Grouping])=2&&SELECTEDVALUE(Table_2[CostCenter])=1,"Group2",IF(SELECTEDVALUE(Table_1[Grouping])=3&&SELECTEDVALUE(Table_2[CostCenter])=2,"Group3","Group1")))

vpollymsft_1-1643697773541.png

If I have musunderstood your meaning, please provide your pbix without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

View solution in original post

3 REPLIES 3
v-rongtiep-msft
Community Support
Community Support

Hi @dhannaa ,

Does that make sense? If so, kindly mark my answer as the solution to close the case please. Thanks in advance.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

v-rongtiep-msft
Community Support
Community Support

Hi @dhannaa ,

Please refer to my steps to see if it helps you.

Create relationships between the three tables.

vpollymsft_0-1643697717670.png

Then create a measure.

balance = 
IF(SELECTEDVALUE(Table_3[Dimension])=1,"Group4",IF(SELECTEDVALUE(Table_1[Grouping])=2&&SELECTEDVALUE(Table_2[CostCenter])=1,"Group2",IF(SELECTEDVALUE(Table_1[Grouping])=3&&SELECTEDVALUE(Table_2[CostCenter])=2,"Group3","Group1")))

vpollymsft_1-1643697773541.png

If I have musunderstood your meaning, please provide your pbix without privacy information and desired output.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

lbendlin
Super User
Super User

The best way to accomplish this would be to implement Calculation Groups

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors