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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BramK
Frequent Visitor

Calculated column from Power BI Desktop not working in Report Server

Hello

 

To get the latest data out of the fact, I made a calculated column in Power BI, which I can use to filter my page.

If I choose the value 1 for that filter, I will get the latest month with data in the fact.

 

When I copy this calculated column to Report Server, I get an error.
I tried using selectedvalue but then my filter never finds a match, so only returns 0 


Below my code and the error message (sorry, the formatting doesn't transfer for some reason)

 

MaxMonth =
VAR LastValue =
CALCULATE (
LASTNONBLANKVALUE (
VD_DATE[D_DATE_MONT_YYYYMM_NUMBER],
SELECTEDVALUE ( VD_DATE[D_DATE_MONT_YYYYMM_NUMBER] )
),
VF_HR_INDIV_MONTH
)
RETURN
if(LastValue = MIN(SELECTEDVALUE(VD_DATE[D_DATE_MONT_YYYYMM_NUMBER])),1,0)

BramK_0-1688716211913.png

 

2 REPLIES 2
lbendlin
Super User
Super User

Are you sure this is a measure in Power BI Desktop?  Smells more like a calculated column.

Oops, indeed!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.