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.
Hello,
i have a problem, with sum and thant vhat a have too give in a table in powerBI.
I have a formula in SSAA:
PLAN NAB PREMIJA VRED:=CALCULATE([SumPlan_nab_premija]*[SumPlan_kol]/1000;
FILTER ( ALL ('cisppr cista_prodajna_premija'); 'cisppr cista_prodajna_premija'[datum_posnetka] = MAX('cisppr cista_prodajna_premija'[datum_posnetka]));
VALUES('cisppr cista_prodajna_premija'[Nivo 1]);
VALUES('cisppr cista_prodajna_premija'[Nivo 2]);
VALUES('cisppr cista_prodajna_premija'[Nivo 3]);
VALUES('cisppr cista_prodajna_premija'[Nivo 4]);
VALUES('cisppr cista_prodajna_premija'[mesec]);
VALUES('cisppr cista_prodajna_premija'[leto])
)
than table in PowerBI:
the nivo 4 is ok, nivo 3, nivo 2 and nivo 1 a would like that is sum nivo 3 sum (nivo4) and so one.
Please help.
thx
LEa
This sounds like an order of operations issue. Currently the code is summing the two measures, then doing the multiplication and division and it sounds like you want it to do the multiplication and division first then sum up the results.
You could achieve this by doing a SUMX over the values in [Sistem naziv enote] (assuming that is the lowest level that you want the values calculated at)
eg.
REAL NAB PREMIJA VRED v2 =
var maxDatum = MAX('fact (2)'[datum_posnetka])
return CALCULATE(
SUMX( VALUES('fact (2)'[Sistem naziv enote]),
[SumReal_nab_premija]*[REAL NAB KOL]/1000)
, 'fact (2)'[datum_posnetka] = maxDatum )
I have a very big data model (data are secure). My question is how to use different formula (measure- DAX) in the same column for different levels.
thx
Lea
Hi @LeaRupnik ,
Can you please share some sample data? We will understand your requirement more clearly. Thanks!
Hi @v-xuding-msft ,
https://drive.google.com/file/d/1Jy0l-WGouAHszo3eCFNzERGOwIM9_p37/view
there is example, please help.
thx
Lea
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 |
---|---|
14 | |
6 | |
4 | |
3 | |
3 |
User | Count |
---|---|
15 | |
9 | |
6 | |
3 | |
3 |