Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
I have a live streaming dataset in the service and a report in desktop that direct queries that dataset.
The dataset has an order_datetime and order_qty field and some other dimensions (in one big table).
I create a measure:
cumulative = calculate(sum(order_qty),filter(all(mytable),order_datetime<=max(order_datetime)))
I create a table visual showing order_datetime and order_qty and my measure.
All is good ... every row where there is an order_qty I see the cumulative increase by that number. Here is datetime, cmulative and qty:
I change the measure:
cumulative = calculate(sum(order_qty),filter(allselected(mytable),order_datetime<=max(order_datetime)))
because I want other slicers on the report, slicing other dimensions of the order, to affect this cumulative total. I apply a filter on the visual for order_datetime on or after midnight today and now here is datetime, cmulative and qty:
All is bad! Only some rows in the table of orders cause the cumulative to increase. All the slicers are set to select all and no other visual or page filters other than the date; and I can't see any commonality between the rows that do cause the cumulative to increase.
I'm probably doing something completely obvious to you guys but I can't figure it at all! 😞
So, in case anyone gets here in the future ... I suspected this was a data type issue and this is what I did ...
I exported my data to Excel and made a new report off the Excel file in which, of course, the measures work as expected.
On loading the Excel file, BI transforms my datetime column to datetime in M, like this:
and it looks like a datetime in the canvas
and it builds a date hierarchy off it in the Data pane.
In the live version, it claims to believe it's a (greyed-out) datetime but doesn't create the hierarchy (or prompt you with dot-notation when creating measures off it) ...
CONCLUSION: in the live version the measures don't work because it's not quite treating that field as a datetime somehow, even though it says it is
EDIT: the incoming data is a datetime from stream analytics - as it's end-to-end MS stuff I'm going to ask them!
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
31 | |
15 | |
14 | |
14 | |
9 |