Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
hi
i'm using Direct Qid_uery and i'm having a hard time filtring my date with "CALCULATE" function.
I have a Column "ID_OF", and i want to run the result juste for the highest value of "ID_OF".
So i created this mesure :
But it didn't work. I get the result for all "ID_OF" and not the max as i wanted.
So i put the "last_OF" variable, in a mesure :
And this mesure gave me the max value of "ID_OF" as planned. Wich is 12198 in this case.
But i don't understand why it didn't work on my first formula? i changed the variable "Last_OF" with the mesure that i have just created "Last_OF", but nothing changes.
However, i get the result that i'm expecting when i replace 'Last_OF" by it's value :12198.
Need help please
Solved! Go to Solution.
Hi @Ghaston,
Actually when you were calculating last_of in your variable that is dynamic and you provide a scenario where you are fixing a fixed value like 12198.
So in variable also you have to do same, by filtering all table data.
Hope this will solve your problem. i have also sent you pbix file.
Best Regards,
Ravi
hi @Anonymous
I'm using Direct Query, so u won't be able to open my pbix file.
So i created for you this new one :
https://drive.google.com/open?id=1hIOrBiDhahKZg87QaCJo5hTcDEHvJAcv
Hi @Ghaston,
Actually when you were calculating last_of in your variable that is dynamic and you provide a scenario where you are fixing a fixed value like 12198.
So in variable also you have to do same, by filtering all table data.
Hope this will solve your problem. i have also sent you pbix file.
Best Regards,
Ravi
hi @Anonymous
That worked perfectly!
Thanks.,
But i didn't understand why my code didn't work. Can you explain that for me please? i would appreciate it
Yeah, Sure.
I have explained you above
Once more....
See when you are calculating the "last_of" variable and putting that on card it is showing you data without any filteration. But in line chart you are using that "last_of" against the Date. Every Date has different "last_of" value you can also verify that by putting last_of in table with date.
Actually your motive is to show total value having Ligne="ligne 68". Thats why i have calculated with all filter.
Regards,
Ravi
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
38 | |
31 | |
26 |