Forum Discussion
Calculated table to solve many to many error
- 2 years ago
Hi itstech
Take a look at the linked guide of data Bear, it should help :
https://databear.com/adding-targets-in-power-bi-report/If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi itstech ,
Please have a try.
For example, if you want to create a calculated table that shows the sales target value and the actual sales value for each month and department, you could use a formula like this:
Sales Target vs Actual =
SUMMARIZE(
UNION(
SalesTarget,
ADDCOLUMNS(TransactionData, "Sales Target Value", BLANK())
),
[Month End date],
[Department],
"Sales Target Value", SUM([Sales Target Value]),
"Actual Sales Value", SUM([Sales Volume KL])
)
This formula uses the UNION function to combine the two tables, adding a blank column for the sales target value in the transaction data table. Then it uses the SUMMARIZE function to group the rows by month and department, and calculate the sum of the sales target value and the actual sales value for each group.
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.