Forum Discussion
PrieleBI
1 year agoFrequent Visitor
Slicer usage for two tables differently
Hello, Please help with this issue. How to created helper measure for this selection I want to use only ID slicer and get this result for two tables: 1.Table 1 shows detailed information about ID;...
- 1 year ago
Hi PrieleBI
This design does not align with best practices for relationships. Typically, relationships should flow from Dim to Fact tables in a one-to-many structure. However, in your model, the relationships flow from Fact to Dim. Moreover, your sales table will likely be on the many side of relationships, so the flow should be toward it in a one-to-many structure, not the other way around. Additionally, the Shop Plan table is another fact table. To properly link the two fact tables, you'll need to create additional dimension tables, such as Shop and Product, to act as bridges.
Once the model is properly setup, you should be able to create working measures with a simple logic.
Sales Qty all ID = CALCULATE ( SUM ( Sales[SalesQuant] ), REMOVEFILTERS ( Sales[ID] ) ) Plan Execution = DIVIDE ( [Sales Qty all ID], SUM ( ShopPlan[Shop Plan] ) )Please see the attached pbix.
Ashish_Mathur
1 year agoSuper User
Hi,
Here's my take
- Write a calculated column formula (LOOKUPVALUE() function) in the Sales table to bring over the Shop Plan column from the Shop Plan table. The Shop Plan table will now be rendered useless for the purpose of calculations/building visuals.
- Relationships with the Calendar table should always be w.r.t the Date column. So both in the Calendar table and Sales table, create a proper date column.