So main table is
Name | Code | Sum | Count
asdd | zz | 231 | 2
dfsfds | x | 523 | 2
myt | y | 768 | 5
% | 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
IF ( isDecimal(RelatedTable[%]) = True then
if(RelatedTable[%] = textVal1 then 0.06 else [measureSome%]))
So main measure must bemeasureMain = [measure1] - [measure2] * measureDinamicPercentage
So have to write measureDinamicPercentage ?
Go to Solution.
measureSome% = DIVIDE(SUMX(ALL('Table'),'Table'[Sum]),SUMX(ALL('Table'),'Table'[Count]))
View solution in original post
Hi @Analitika ,
What's the measure1 and measure2?
Please show me your desired result in a screenshot or in a table.
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
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%]))
TY for reply.
measureSome% = TotalCount / TotalSumand same for each row,
Check out the on demand sessions that are available now!
Check out the Winners!
Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.