Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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 April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
67 | |
67 | |
42 | |
42 |
User | Count |
---|---|
46 | |
40 | |
28 | |
27 | |
26 |