Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello PBI Community!
I have what I think is a simple question but as of yet have not been able to produce the appropriate outcome.
I have a date table, a fact table, and a lookup table. The lookup table has daily standards (goals) that I will be using to compare to the actual daily output. On the days when I don't have data for an individual it does not report the goal for that day (Individual 4, below). As you would guess, I would like to report the goal even if they don't have data.
Any guidance would be much appreciated!
Steve
Daily report dTrainMatch
Goal Dist =
VAR sumgoaldist =
SUMX (
fDataReference,
LOOKUPVALUE (
dTrainMatch[Goal-Dist],
dTrainMatch[Date], RELATED ( dDateSeason[Date] )
)
)
RETURN
IF (
[Total Dist] = BLANK (),
sumgoaldist * [Top 10 Avg Dist],
sumgoaldist * [Top 10 Avg Dist]
)
Before trying to write anything... everyone who is new to DAX should read this: Understand star schema and the importance for Power BI - Power BI | Microsoft Docs
After that, it should be easier for you to understand where you go wrong... Please always remember that "not everything that can be done should be done."
Thank you for sending along this reference @Anonymous. I've read it before, but I think it would be worth reading it again.
Also, your saying fits my situation. I ended up finding a solution to my problem and it had little resemblence to what I posted above. The IF statement has been removed.
The IF in the measure is totally useless. Since both expressions return the same thing, what does it do?
Thank you for the response, @Anonymous,. When you're as new as I am to DAX bad code means that one is desperate to find a solution and will make silly mistakes along the way. I am just trying to find a solution to my problem.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
User | Count |
---|---|
69 | |
36 | |
21 | |
17 | |
15 |
User | Count |
---|---|
126 | |
30 | |
28 | |
24 | |
23 |