The task is as follows:
- there is a filter that filters our data set (the lower table) by "Slice Date".
- there is a visual element that displays 2 columns - "The amount on the document date" (it is calculated on the document date and the slicer should not change - the condition for calculating the " Slice date"="Document date").
The second column is the current amount, which is calculated on the slice date in the slicer selection (that is, this indicator depends on the filter and changes).
How do I make a measure for "Amount on document date", which operators to use?
Are there any suggestions suitable for your scenario? If that is the case, you can consider kudo or accept it to help others who face a similar scenario.
If not, please share some more detailed information to help us clarify your scenario.
If you want to achieve some advanced filer effect, I'd like to suggest you break the relationship that you do not want to directly apply to your table.
Then you can write a measure expression to check and compare the selections and use on the 'visual level filter' to filter records.
Hi, thank you for fast response.
There is no dimDate table.
Just fact table please see pbix in the following link
and an attached pict.
I'm not if I fully understood what you want.
The following measure is giving you back the sum of Pokaz1 where the [Document date] = [Slice date]:
Amunt on Document date = VAR vSlicerDate = SELECTEDVALUE( 'Table'[Slice date] ) VAR vAmount = CALCULATE( SUM( 'Table'[Pokaz1] ), ALL( 'Table'[Slice date] ), 'Table'[Document date] = vSlicerDate ) RETURN vAmount
Is that what you wanted?
Otherwise, just let me know if the measure needs changes.
No, it's not.
It is necessary that when filtering "Slicer by date", the rows do not disappear.
Look at the picture below, where the arrows indicate what values should be obtained in the measure, while this measure should not react to the "Slicer by date"
@Ritaf , is the slicer date is coming from an independent table ?
If so you can use
var _max = maxx(ALLSELECTED('Date'),'Date'[Date])
var _min = minx(ALLSELECTED('Date'),'Date'[Date])
calculate(Sum(Table[value] ), filter(Table, Table[document date] >=Min && Table[document date] <=Max ))
if something is joined with slicer date you can get
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Click here to read more about the November 2022 updates!
Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.
This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.