Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not 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 5
Ahmedx
Super User
Super 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)

 

 

Anonymous
Not 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

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])

 

Anonymous
Not applicable

no not working

result is showing different

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors