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

Blank value in Dimension, doesn't exist in the source view

Hi all, I'm currently trying to make a few measures for my data model (for simplicity's sake, it's basically a fact table linked to a calendar via a foreign key).

 

However, a measure I'm making doesn't work, and returns this error :

NossairR_1-1639153138323.png

 

When I tried looking into why that may be, it seems that there are some blank values in a dimension : 

NossairR_0-1639153127622.png

 

But when I look up the source view for it, there doesn't seem to be any :

NossairR_2-1639153348859.png

I thought maybe there were some fact values that weren't linked to the dimension, but all foreign keys do exist in it  :

NossairR_3-1639153443248.png

When trying to reproduce the measure in PBI, I see that there is a blank value involved : 

NossairR_4-1639153510828.png

 

Is there any way to know how to fix it ? Here's what the measure looks like : 

MyMeasure:=
VAR chosen_date =
IF (
ISCROSSFILTERED ( '0-05 - Calendar' ),
LASTDATE ( '0-05 - Calendar'[Date - Civil] ),
TODAY ()
)
RETURN
CALCULATE (
SUM ( 'Fact'[Quantity] ),
filter(all(Fact),Fact[Prediction_Date]
= VALUE ( FORMAT ( EDATE ( chosen_date, -3 ), "YYYYMM" ) )&&
Fact[Month_In_Year] = VALUE ( FORMAT ( chosen_date, "YYYYMM" ) )
))

Thanks in advance,

Nossair

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , I doubt you fact has some dates which are missing in the date/year table

 

 

refer

https://www.youtube.com/watch?v=23qemkDqMVY

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , I doubt you fact has some dates which are missing in the date/year table

 

 

refer

https://www.youtube.com/watch?v=23qemkDqMVY

Anonymous
Not applicable

You're right ! I tried to simplify the model but I just realized that there was another fact table in my model that had a calendar foreign key that wasn't in the dimension. Thanks a lot !

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.