Forum Discussion
Anonymous
3 years agoNot applicable
How to set a column into a variable ?
Hi in my previous report they were using caluclated column, that was used in multiple charts, But performence wise it will take time to show the visual. Now i want to change that caluclated column into measure .
i tried multiple ways but wont work. it showing some errors.
This is the caluclated column .
LOB =
VAR PROJ='Wiser Jira Mapping'[Wiser Instance & solution mapping to Jira project]
VAR CAT=CALCULATE(MAX(DimProjects[CATEGORY])
,FILTER(ALL(DimProjects),DimProjects[NAME]=PROJ))
RETURN
IF(CAT=BLANK(),"NA",CAT)
Please let me know the solution if you found anything.
Thanks in advance
5 Replies
- AhmedxSuper User
try like this:
LOB = VAR PROJ= CALCULATE( MAX('Wiser Jira Mapping'[Wiser Instance & solution mapping to Jira project])) VAR CAT=CALCULATE(MAX(DimProjects[CATEGORY]) ,FILTER(ALL(DimProjects),DimProjects[NAME]=PROJ)) RETURN IF(CAT=BLANK(),"NA",CAT)LOB = VAR PROJ= MAX('Wiser Jira Mapping'[Wiser Instance & solution mapping to Jira project]) VAR CAT=CALCULATE(MAX(DimProjects[CATEGORY]) ,FILTER(ALL(DimProjects),DimProjects[NAME]=PROJ)) RETURN IF(CAT=BLANK(),"NA",CAT)- AnonymousNot applicable
Hi Ahmed,
Its working
but while iam using in matrix(Rows) it wont take the measure
how can i set it into matrix in ROws section- sevenhillsSuper User
Try and see if this works, by only replacing this line (and keep the rest of the measure code)
VAR PROJ= SELECTEDVALUE('Wiser Jira Mapping'[Wiser Instance & solution mapping to Jira project])