Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello,
I've been searching high and low for a solution for this and I still can't find a way to make it work.
I have a table that contains sales values, the columns are as follow:
Sales Person
Date
Sales Amount
and I have a slicer with dates that are coming from a date table.
My goal is to create a measure that sums up ALL the sales amount until the max selected date. so for example, if the user selected the dates from the slicer as below:
The measure would sum up all the sales amount from 2020 until the max selected month in 2023
Any support would be appreciated, and I am happy to answer any quesitons to clarify the issue.
Yes, but you will have to add a dates table to your model. Then you use the dates table in your slicer and you can write the measure like this.
Total To Date =
VAR _Max = MAX ( DATES[Date] )
RETURN
CALCULATE ( SUM ( YourTable[Amount] ), DATES[Date] <= _Max )
I am assuming you are going to want to have a filter on sales person still work so try a filter like this.
Total To Date =
VAR _Max = MAX ( YourTable[Date] )
RETURN
CALCULATE ( SUM ( YourTable[Amount] ), ALLEXCEPT ( YourTable, YourTable[Sales Person] ), YourTable[Date] <= _Max )
is there any other way of doing this? using ALLEXFCEPT prevents me from adding data from other tables to the visuals.
the visual I'm using is a matrix, it pulls two rows from dimensions tables that are connect to all the other tables, the values in the matrix are the measures and one of the measures is the sales amount. If I use ALLEXCEPT, I can't use data from other tables in the visual.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
56 | |
38 | |
34 |
User | Count |
---|---|
99 | |
56 | |
51 | |
44 | |
40 |