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.
So main table is
Name | Code | Sum | Count
asdd | zz | 231 | 2
dfsfds | x | 523 | 2
myt | y | 768 | 5
Related Table
% | Code
0,05 | x
textVal1 | y
textVal2 | z
0,05 | zz
0.1 | aa
I have measure wich calculate some percentage
measureSome% = divide(Sum, Count)
Then i have second measure where use this percentage
measureMain = [measure1] - [measure2] * measureSome%
Now, i need write new measure to take dinamicaly perecentage from related table if meet criteria
measureDinamicPercentage =
IF ( isDecimal(RelatedTable[%]) = True then
RelatedTable[%]
else
if(RelatedTable[%] = textVal1 then 0.06 else [measureSome%])
)
So main measure must be
measureMain = [measure1] - [measure2] * measureDinamicPercentage
So have to write measureDinamicPercentage ?
Solved! Go to Solution.
Hi @Analitika
this one?
measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))
Hi @Analitika
If I'm correct, you might refer to these results:
measureDinamicPercentage = IF(IFERROR(VALUE(MAX('Table (2)'[%])),1)=1&&MAX('Table (2)'[%])="textVal1",0.06,IF(IFERROR(VALUE(MAX('Table (2)'[%])),1)<>1,MAX('Table (2)'[%]),[measureSome%]))
Pbix attached.
TY for reply.
measureSome% = TotalCount / TotalSum
and same for each row,
Hi @Analitika
this one?
measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))
Hi @Analitika ,
What's the measure1 and measure2?
Please show me your desired result in a screenshot or in a table.
Thanks.
Aiolos Zhao
Proud to be a Super User!
It does not matter what is measure1 and measure2, say this is 10 - 5
I cant post anything more as i dont have working measure
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 |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |