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
Hi Community,
I am trying to figure out whether it is possible to have a static column and a "changeable" one in the same graph.
To better explain i would for the column with the BLUE arrow to be static (always display data for the last 2 years) and for the column with the RED arrow to be changing based on a filter slicer (i could select for example this quarter or last quarter data).
do you know whether this is even possible?
Thanks in advance!
Solved! Go to Solution.
Let's assume you are comparing duration, and you have a duration measure (the red arrow, dynamic).
You need to create a second, calendar -resistant measure:
Duration (Last 2 Years)=
VAR _MaxYear=
CALCULATE(
MAX('Calendar'[Year]),
REMOVEFILTERS()
)
RETURN
CALCULATE(
[Duration],
REMOVEFILTERS('Calendar'),
KEEPFILTERS('Calendar'[Year] => (_MaxYear-1))
)
Let's assume you are comparing duration, and you have a duration measure (the red arrow, dynamic).
You need to create a second, calendar -resistant measure:
Duration (Last 2 Years)=
VAR _MaxYear=
CALCULATE(
MAX('Calendar'[Year]),
REMOVEFILTERS()
)
RETURN
CALCULATE(
[Duration],
REMOVEFILTERS('Calendar'),
KEEPFILTERS('Calendar'[Year] => (_MaxYear-1))
)
somehow it doesnt exactly work for me.
does the first REMOVEFILTER formula have to be empty?
Okay, it works with the filled REMOVEFILTERS!! thanks a lot!
@alevandenes so you need one measure that always show the last 2 years and one that is changeable. Or you can't use 2 measures and must put a label?
i think i can use two measures. just not sure how to 😕
@rbriga already gave you one and the other one is the just the simple aggregatiom that will be responsive to any filter context including from the date slicer
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 |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |