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.
Hello Community,
dashboard is running on DirectQuery in a sqlserver .
What i want to do is count the IDs from my log/historical table in the lastupdatedate 7 days ago, in a time window of 1 hour.
all this is working, no problem, the problem is, after midnight, the VARs continue to return yesterday values, they dont update to "today"
VAR MAXTIME = CALCULATE(MAX(lastUpdateTimer[timekey])) -- 100s means hours, 10s means minutes. VAR MAXDATE = CALCULATE(max(lastUpdateTimer[lastUpdateDate])) -- simple date Return CALCULATE( DISTINCTCOUNT(fLocalizacao_historico_30dias[id]) ,fLocalizacao_historico_30dias[SimpleDate] = MAXDATE-7 ,fLocalizacao_historico_30dias[TimeKey] >= FORMAT(VALUE(MAXTIME - 100),"####") && fLocalizacao_historico_30dias[TimeKey] <= MAXTIME )
if i open the PBIX file, go to powerquery window, and hit the refresh all, everything goes back to work, else, it just remains "Blank".
Any thoughts?
i read on some places that once a variable is set, it just keeps re-using its value, but how to make it update when there is an update?
big thanks
Solved! Go to Solution.
Hi @Nickgastaldi,
Based on your description, it seems that the measure works as expected.
For the var value in Direct Query, it will update when have a calculate or have a refresh.
i read on some places that once a variable is set, it just keeps re-using its value, but how to make it update when there is an update?
For your scenario, you should hit a refresh to update the measure or re-use the measure.
Best Regards,
Cherry
Hi @Nickgastaldi,
Have you solved your problem?
If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @Nickgastaldi,
Based on your description, it seems that the measure works as expected.
For the var value in Direct Query, it will update when have a calculate or have a refresh.
i read on some places that once a variable is set, it just keeps re-using its value, but how to make it update when there is an update?
For your scenario, you should hit a refresh to update the measure or re-use the measure.
Best Regards,
Cherry
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |