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
philseim
Frequent Visitor

DAX measures using whole number different reacts differently to different users pcs.

Hi

 

I have a DAX query that looks like this 

YTD - OB1 = IF(MAX('DimDate'[Month]) > 4,blank(), CALCULATE([Opening Balance] , FILTER(DimDate, DimDate[Date] = MIN(DimDate[Date] ))) )
On my pc it doesn't work but on my colleagues it works. Same report. 
The dimDate[Month] is a whole number type. For some reason my pc will only accept it if I put it in " ", but then it doesn't recognise it as a number. Any ideas?
1 ACCEPTED SOLUTION
philseim
Frequent Visitor

Found the issue. Must have something to do with a pc setting not sure where.

I had to put a space after the number. Its as if power bi doesn't recognise integers in DAX unless there's a space after them.

View solution in original post

4 REPLIES 4
philseim
Frequent Visitor

Found the issue. Must have something to do with a pc setting not sure where.

I had to put a space after the number. Its as if power bi doesn't recognise integers in DAX unless there's a space after them.

philseim
Frequent Visitor

Thanks for the reply @v-yulgu-msft .

The [opening balance] is based on another measure that also seems to not be working on my pc but works on my colleagues.

Opening Balance = IF(MAX('DimDate'[Year]) = 2019,        (CALCULATE([CountClient],filter(Claimants_Rolling,Claimants_Rolling[CommonType] = "Opening Balance")) +3), CALCULATE([CountClient],filter(Claimants_Rolling,Claimants_Rolling[CommonType] = "Opening Balance")) )
The data type for [CountClient] is a whole number
 
The error I get for this measure is:
The syntax for '(' is incorrect. (DAX(IF(MAX('DimDate'[Year]) = 2019. (CALCULATE([CountClient],filter(Claimants_Rolling,Claimants_Rolling[CommonType] = "Opening Balance")) +3), CALCULATE([CountClient],filter(Claimants_Rolling,Claimants_Rolling[CommonType] = "Opening Balance")) ))).
 
Its almost like its looking at wehatever is after the 2019 and not allowing it. That [year] is a whole number
 
v-yulgu-msft
Employee
Employee

 
Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-yulgu-msft
Employee
Employee

Hi @philseim ,

 

What data type does [Opening Balance] return in your PC? You said on your pc, it doesn't work, then what result do you get? Is there any error prompted?

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.