The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi All,
I have PBI Dashbaord developed initially using import and I am trying to do the same using Direct query.howver below function works well in import but no values resulting in direct query.
Hi @PBIViz_2024
Pleasre try the following Dax:
Total Tonnage-Latest =
VAR Latest_time = CALCULATE(MAXX(ALL(Table1), Table1[datetime_val]))
VAR _output =
CALCULATE(
SUM(Table1[value]),
FILTER(
Table1,
Table1[datetime_val] = Latest_time
),
ALLSELECTED(Dimensiontable1[category])
)
RETURN _output
Best Regards,
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@PBIViz_2024
You code looks okay, check if any other filters affecting the calcultion on the report. Try to run a Evaluate Table1 in DAX Query View
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
106 | |
97 | |
55 | |
49 | |
46 |