Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi everyone!
Before to write about this problem I have searched everything on this topic and applied every solution I have found. But it didn't help. The problem is following:
FactorVol=
sumx(
Values('calendar'[date],
if(
hasonefilter('prod'[product]),
( [Qnt_Act] - [Qnt_bp] ) * [price_bp],
Sumx(
values('prod'[product]),
( [Qnt_Act] - [Qnt_bp] ) * [price_bp]
)))
the problem is in calculation of [price_bp]. Here it is:
calculate(
sumx(filter('rev_bp', 'rev_bp'[item] = "a"), 'rev_bp'[revenue])
/
sumx(filter('rev_bp', 'rev_bp'[item] = "a"), 'rev_bp'[qnt]),
allselected()
)
When I remove allselected() total is fine, but it's essential to have it in formula.
You can see the matrix with wrong total in column FactorVol (54,76 is incorrect number)
so I am asking for help
Thanks a lot,
In spite of getting the right total the problem stays the same because total itself hasn't changed. Solution changed values in the rows:
Instead it seems to me we have to change calculation of Price_BP so that we get following results:
in another words we need to stick price of item "a" for each other items in particular period
so let's explore further
Hi @AlexBill ,
The problem may be that SUMX's iterator sets ALLSELECTED's shadow filter to VALUES (). Try to save [price_bp] to a variable before iteration, for example:
FactorVol=
VAR price = [price_bp]
RETURN
sumx(
Values('calendar'[date],
if(
hasonefilter('prod'[product]),
( [Qnt_Act] - [Qnt_bp] ) * price,
sumx(
values('prod'[product]),
( [Qnt_Act] - [Qnt_bp] ) * price
)))
Best regards,
Mengmeng Li
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 14 | |
| 9 | |
| 5 | |
| 5 |