Forum Discussion
Need help for calculating data
- 7 years ago
Hi A_H ,
I would create additional tables to make dimension table to relate this two.
SalesMan = SUMMARIZE(ALL(Targets[SalesMan]);Targets[SalesMan]) Brands = SUMMARIZE(ALL(Targets[Brand Id]);Targets[Brand Id]) PeriodCode = SUMMARIZE(ALL(Targets[PeriodCode]);Targets[PeriodCode])
Also would create an additional column on orderlines to have the period code
PeriodCode = FORMAT(OrderLines[OrderDate ];"mmm-yy")
Be aware that this are DAX formulas but this columns and tables can also be created in the query editor.
Also regarding the period you can also create a calendar table to relate with the other tables.
Then make a realtion ship betwen the 3 new tables and the other 2.
Use the columns on the dimension tables for your data and the rest comes from the other tables (as you can see I added a measure with the difference to target):
Check PBI file attach
Regards,
MFelix
Hi A_H ,
I would create additional tables to make dimension table to relate this two.
SalesMan = SUMMARIZE(ALL(Targets[SalesMan]);Targets[SalesMan]) Brands = SUMMARIZE(ALL(Targets[Brand Id]);Targets[Brand Id]) PeriodCode = SUMMARIZE(ALL(Targets[PeriodCode]);Targets[PeriodCode])
Also would create an additional column on orderlines to have the period code
PeriodCode = FORMAT(OrderLines[OrderDate ];"mmm-yy")
Be aware that this are DAX formulas but this columns and tables can also be created in the query editor.
Also regarding the period you can also create a calendar table to relate with the other tables.
Then make a realtion ship betwen the 3 new tables and the other 2.
Use the columns on the dimension tables for your data and the rest comes from the other tables (as you can see I added a measure with the difference to target):
Check PBI file attach
Regards,
MFelix