Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi guys, need help here
My last date of data is not today.
I have a slicer that is after x date to the latest production date. However, In my values I do not wish to display (it is showing a large dip at the end because the data is incomplete mid-day)
I am trying to find the difference between the dates after, and the selected date, while excluding the most recent date.
This is my formula without excluding the most recent date - which is not today() but a date from the data source
DeltaProduction = SUM(table[production]) - CALCULATE(SUM(table[production]), FIRSTDATE(ALLSELECTED(Table[productionDate])))
Hello @nicholaskong ,
In my opinion, in order to avoid a big fall, you want to sum the production after the selected date and calculate the difference between the selected one and the sum, right?
You can use the following formula:
DeltaProduction =
VAR _total =
CALCULATE (
SUM ( 'Table'[Production] ),
FILTER (
ALL ( 'Table' ),
'Table'[ProductionDate] > MIN ( 'forSlicer'[ProductionDate] )
&& 'Table'[ProductionDate] < MAX ( 'forSlicer'[ProductionDate] )
)
)
RETURN
IF (
MAX ( 'Table'[ProductionDate] ) < MIN ( forSlicer[ProductionDate] ),
SUM ( 'Table'[Production] ) - _total,
0
)
Have I answered your question? Please mark my answer as a solution. Thanks a lot.
If not, load some insensitive data samples and expected output.
Best regards
Eyelyn Qin
@Anonymous , You can try a new measure like
new measure =
var _max =maxx(allselected(date), Date[date])
return
calculate([measure], filter(Date, Date[date] <_max))
Graph comes out bad 😕
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |