The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Good day
Please help. I have a conditional measure where I need to return only current fin year values on the visual if there is nothing selected on the Fiscal Year slicer. The dates I'm working with are fin dates i.e. July to June. With help from the forum, I managed to create a measure returning current fin year but I'm struggling to use the same measure in an if statement.
Here is the measure below and if I return just variables I get correct values but when I return the if statement I get values for all the fin years:
Solved! Go to Solution.
Hi @Tlotly ,
Silly question, but is there a reason why you aren't using your original measures and just applying a visual-level filter to your table to exclude blank values of your measures?
I'vejust checked your PBIX, and applied a visual-level filter to your table of [WeightedErrorsCY] is not blank, and I get the following ouput:
This is what you want, right?
Pete
Proud to be a Datanaut!
Hi @Tlotly ,
Add a clause into your measure for what to return if nothing is filtered on the slicer, along the lines of:
IF(
NOT ISFILTERED(calendar[Fiscal Year]),
[CY Measures],
...other possible inputs/outputs
)
Pete
Proud to be a Datanaut!
@BA_Pete thank you and I get what you mean. I've tried doing that, actual problem is on the [CY Measure] part. I'm struggling to replace [CY Measure] with the condition in order to execute only for the current year.
Hi @Tlotly ,
Silly question, but is there a reason why you aren't using your original measures and just applying a visual-level filter to your table to exclude blank values of your measures?
I'vejust checked your PBIX, and applied a visual-level filter to your table of [WeightedErrorsCY] is not blank, and I get the following ouput:
This is what you want, right?
Pete
Proud to be a Datanaut!
@BA_Pete okay thanks. If you remove Measure3 and look at the other 2 measures on the visual, you'll see they work perfectly without putting on a visual filter . I guess that's why I thought I could do the same for Measure 3. I'm new to Power BI so sometimes I tend to think everything must be done on DAX...lol. I'll use the visual filter then, thank you.