Forum Discussion
AS1110
3 years agoFrequent Visitor
DAX
Hi, I have a requirement where If a project belongs to both Cloud and On Premise then the training values has to be considered from a Cloud group.Else If a project belongs to only on premise then...
- 3 years ago
Hi,
Here is one way to do this:Measure 46 =var _pid = MAX('Table (32)'[ProjectID])var _rows = COUNTROWS(FILTER(ALL('Table (32)'),'Table (32)'[ProjectID] = _pid))var _test = IF(_rows=2,1,0)var _result= IF(_test=1,CALCULATE(MAX('Table (32)'[Trainings]),FILTER('Table (32)','Table (32)'[Group]="Cloud")),MAX('Table (32)'[Trainings]))return_result
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
ValtteriN
Community Champion
3 years agoHi,
Here is one way to do this:
Measure 46 =
var _pid = MAX('Table (32)'[ProjectID])
var _rows = COUNTROWS(FILTER(ALL('Table (32)'),'Table (32)'[ProjectID] = _pid))
var _test = IF(_rows=2,1,0)
var _result= IF(_test=1,CALCULATE(MAX('Table (32)'[Trainings]),FILTER('Table (32)','Table (32)'[Group]="Cloud")),MAX('Table (32)'[Trainings]))
return
_result
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/