Forum Discussion
Want to develop a logic inside Power BI Desktop
- 7 years ago
Anonymous,
Check measure below and take a look at this article.
Measure 2 = VAR w = SELECTEDVALUE ( Table1[week_relative] ) RETURN IF ( NOT ( ISBLANK ( w ) ) && w = 0, CALCULATE ( [Measure], Table1[week_relative] <= 0 ), [Measure] )
Anonymous
Could you please provide the screenshots of your sample data and the result you expected?
Thanks & BR
Ryan
- Anonymous7 years agoNot applicable
I don't have any sample data, Here i'm trying to achieve the solution like:
Sample Data:
week_relative: Measure:
-1 10
-2 20
(Blank) 30
0 40
1 50
2 60
Trying to achieve,
if ([Week_relative]=0,
calculate(sum(measure),[week_relative]<=0 I.e. (10+20+30+40),
else show the result as it is
week_relative Measure
1 502 60
- v-chuncz-msft7 years agoCommunity Support
Anonymous,
Check measure below and take a look at this article.
Measure 2 = VAR w = SELECTEDVALUE ( Table1[week_relative] ) RETURN IF ( NOT ( ISBLANK ( w ) ) && w = 0, CALCULATE ( [Measure], Table1[week_relative] <= 0 ), [Measure] )- Anonymous7 years agoNot applicable
Sam,
It works fine, thnaks muuch for the help!!