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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
DC_ZA
New Member

SELECTEDVALUE returns blank in column but is populated when added to card

I have a table in PowerBI with a monthstring column (YYYYMM), I use this in a filter so the datatype is set as 'text', I created a measure using SELECTEDVALUE to return the monthstring that is selected in the filter. When I add this measure in a card, it returns the correct value and also changes as I change the selection.

 

X_SelectedMonthstring = SELECTEDVALUE(Dim_FilterMonthString[Monthstring])
 
The problem comes in when I want to use this measure in another column, say for instance to add a column with a flag (1 or 0) to indicate the selected monthstring in a table, it is only returning 1 for all fields.
 
Measure: X_SelectedMonthstring = SELECTEDVALUE(Dim_FilterMonthString[Monthstring])
 
Column: X_MonthString_Flag = IF(Dim_FilterMonthString[MonthString]=[X_SelectedMonthstring],1,0)
Column: X_TestString = SELECTEDVALUE(Dim_FilterMonthString[MonthString])
 
card.JPGtable.JPG
 
If I change the column formula to be a fixed value I get the desired results:
Column: X_MonthString_Flag = IF(Dim_FilterMonthString[MonthString]="202106",1,0)table2.JPG
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@DC_ZA 

i don't think the slicer can affect a calculated column. You need to have a measure solution





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
ryan_mayu
Super User
Super User

@DC_ZA 

i don't think the slicer can affect a calculated column. You need to have a measure solution





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@ryan_mayu Thank you, I skipped using the flag column all together and used my measure directly in my second measure and it worked. 

you are welcome





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.