Forum Discussion
Value from max date
- Anonymous6 years ago
share your pbix.
and where are you adding this query
select A.* from dbo.events a
left join (select MachineID,max(EventRaised) _EVENT from dbo.[events]
Group by MachineID) b ON A.MachineID=B.MachineID AND a.EventRaised=B._EVENT
WHERE b._EVENT IS NOT NULLGet Data->Select Sql server -> ENter server name & database name->DirectQuery Mode-> Click on advance -> paste this query there ->
And load your data.
this will give you direct result set
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
Hi lukasjar
I have created your datset on sql server and created directQUery.
The above two measure are showing same result which i was getting using import.
DO one thing create new pbix file and check.
Measures are working fine with directquery and yah i need to look onto column issue.
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.
hI lukasjar
Use below query while connecting to your datasource using directquery.
select A.* from dbo.events a
left join (select MachineID,max(EventRaised) _EVENT from dbo.[events]
Group by MachineID) b ON A.MachineID=B.MachineID AND a.EventRaised=B._EVENT
WHERE b._EVENT IS NOT NULL
I have given you some measures in last post if you want your output using measures.
There are some limitation while creating Calculated column when source is directquery.
Hence calculate,Allexcept,filter and earlier are not working in previous formula.
Check it out here
Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar
If I resolve your problem Mark it as a solution and give kudos.