Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 :
When I tried looking into why that may be, it seems that there are some blank values in a dimension :
But when I look up the source view for it, there doesn't seem to be any :
I thought maybe there were some fact values that weren't linked to the dimension, but all foreign keys do exist in it :
When trying to reproduce the measure in PBI, I see that there is a blank value involved :
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
Solved! Go to Solution.
@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 , I doubt you fact has some dates which are missing in the date/year table
refer
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 !
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
87 | |
65 | |
50 | |
45 |
User | Count |
---|---|
217 | |
88 | |
81 | |
65 | |
56 |