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.
Hi ,
I'm looking assistance for creating measure based on selected date filter in below scenario
DimDate
DateId | Month |
20221001 | Oct |
20220930 | Sep |
FactSales
DatedId | Amt |
20221001 | 100 |
20220930 | 200 |
FactSales (DateId) --> DimDate(DateId)
I have date slicer in power BI Chart( example below). I want to create two measures
Measure:
1) Latest Date(based on max selected value): When I set max date as 20220930 , I should get measure value as 20220930 . when I set max date as 20221001 then I should get value as 20221001.
2) Amount corresponding to select Date:
When I set max date as 20220930 , I should get measure sales value as 100
when I set max date as 20221001 then I should get sales value as 200
Please assist.
Thanks,
Abhiram
Solved! Go to Solution.
Hi,
I cannot know how your datamodel or how your desired outcome looks like, but please try something like below.
expected result measure: =
VAR _maxdate =
MAX ( 'Calendar'[Fiscal Date] )
RETURN
CALCULATE ( SUM ( 'FactSales'[Amt] ), 'Calendar'[Date] = _maxdate )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
Hi,
I cannot know how your datamodel or how your desired outcome looks like, but please try something like below.
expected result measure: =
VAR _maxdate =
MAX ( 'Calendar'[Fiscal Date] )
RETURN
CALCULATE ( SUM ( 'FactSales'[Amt] ), 'Calendar'[Date] = _maxdate )
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Schedule a short Teams meeting to discuss your question
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |