Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a problem in one of my calculation.
I have 2 tables connected to Power BI. One table contains my clients with their billing mode (table 1) and the other table (table 2) contains the transaction of each client.
Depending of the billing mode, I need to add several columns in table 2. For exemple, if the billing mode is Bundle, I have to add Interchange amount and volume amount. If the billing mode is IC, i have to add interchange and CSF amount.
For the moment, I created this calculation:
But the amount is not correct. I think Power BI recovers the total sum of interchange and volume and multiplies the result by the number of customers.
Do you have any idea what's wrong?
Best Regards;
Morgane
Solved! Go to Solution.
Hi @MorganeLachuer ,
By my test, you need to add a ALL function in the measure. the following is my sample you can have a try.
I have two tables. And there is a one-to-one relationship based on the column of id between them.
Measure =
SWITCH (
TRUE (),
MAX ( Table1[BlingMode] ) = "Bundle", SUMX ( Table2, Table2[InterchangeAmount] + Table2[VolumeAmount] ),
MAX ( Table1[BlingMode] ) = "IC", SUMX ( Table2, Table2[CSF Amount] + Table2[InterchangeAmount] )
)
If the result is not what you want, please post your sample data and the expected output.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @MorganeLachuer ,
By my test, you need to add a ALL function in the measure. the following is my sample you can have a try.
I have two tables. And there is a one-to-one relationship based on the column of id between them.
Measure =
SWITCH (
TRUE (),
MAX ( Table1[BlingMode] ) = "Bundle", SUMX ( Table2, Table2[InterchangeAmount] + Table2[VolumeAmount] ),
MAX ( Table1[BlingMode] ) = "IC", SUMX ( Table2, Table2[CSF Amount] + Table2[InterchangeAmount] )
)
If the result is not what you want, please post your sample data and the expected output.
Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |