Forum Discussion
Tim_BE
5 years agoNew Member
Power BI - convert Calculated Column into Measure
Hi all, Hope you can help me out converting a calculated column into a measure. Searched in the forum, but couldn't find a solution that worked well. I created a calculated column in a data t...
- 5 years ago
Hi Tim_BE
This assumes no relationship between your Calendar and fact table:
OpenCases M = VAR currentDate_ = MAX ( Calendar[Date] ) RETURN CALCULATE ( DISTINCTCOUNT ( 'SFDC CASE LIST'[Case Number] ), 'SFDC CASE LIST'[Opened Date] < currentDate_, FILTER ( ALL ( 'SFDC CASE LIST'[Closed Date] ), 'SFDC CASE LIST'[Closed Date] > currentDate_ || 'SFDC CASE LIST'[Closed Date] = BLANK () ) )Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
AlB
5 years agoCommunity Champion
Hi Tim_BE
This assumes no relationship between your Calendar and fact table:
OpenCases M =
VAR currentDate_ =
MAX ( Calendar[Date] )
RETURN
CALCULATE (
DISTINCTCOUNT ( 'SFDC CASE LIST'[Case Number] ),
'SFDC CASE LIST'[Opened Date] < currentDate_,
FILTER (
ALL ( 'SFDC CASE LIST'[Closed Date] ),
'SFDC CASE LIST'[Closed Date] > currentDate_
|| 'SFDC CASE LIST'[Closed Date] = BLANK ()
)
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers