Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello and Thanks in Advance!
I created a measure using selectedvalue function to display a category as a title. The problem is whenever I select any month to filter by, that isn't the first month within the year it displays an the if error portion of the formula "OHA Finances". Please see the measure below
-----------------------------------------------------------------------------
@rtaylor wrote:
Posting Fix. This thread solution has not been marked, because we don't have answer to why this change in formula is requiredVar filtername = Calculate(SELECTEDVALUE(BudgetMap[Budget Summary Ovrhead],"OHA Finances"),ALLEXCEPT('Date','Date'[Date]))
What the calculate is doing here is to ignore the filters on the date slicers. Effectively returning the value from [Budget Summary Overhead] for July.
You still have an issue in your data. If you de-select "Labour" when you have "Sep" selected you will notice that the [Budget Summary Overhead] slicers will go completely empty. This is because there is no data for this column for Sep, which is why selectedvalue() is returning blank.
We don't need a model with real data, but if you could supply a sample model with just the 2-3 tables in question and 5-10 made up rows (that still demostrate this problem) we could diagnose the root cause of this issue. Without being able to see the relationship structure and what the data looks like it is really hard to help.
hi @rtaylor
For your case, it is because that there is no [Budget Summary Ovrhead] data in Aug 2019.
If you want it show Academic Year License Agreements - 8/1/2019 to 8/31/2019 instead of OHA Finances - 8/1/2019 to 8/31/2019 in your report although there is no [Budget Summary Ovrhead] data in Aug 2019, you could try this way to adjust your data model.
Step1:
Create a separate dim Budget Summary Ovrhead table by this formula
Dim Budget Summary Ovrhead = VALUES(BudgetMap[Budget Summary Ovrhead])
Step2:
Create the relastionship with BudgetMap table as below:
Note: cross filter direction is "Single"
Step3:
Use Budget Summary Ovrhead field from this new dim table as a slicer
Step4:
Adjust the VarianceReport_Monthly1 formula as below:
It's hard to say without being able to see your data model. But it looks like you have some sort of bi-directional filtering going on and you only have data for Jul 2019, so if Jul 2019 is not selected the slicer has no values hence SELECTEDVALUE() returns it's alternate value. Changing the bi-directional filtering to single directional might fix this (although it could cause other issues depending on how you have modelled your data)
Hello,
Actually I do have data up until december 2019.
I wish I could share the model, but I'd have to get approval from far too many people.
So yeah, I have work around developed, but I'm trying to understand why this won't work. As of right now this measure is breaking my basic understanding of how filter/slicers are applied.
hi @rtaylor
Please see this screenshot, after i reset all the slicer and then select Fiscal Year 2019,Month Aug, Now there is no data in [Budget Summary Ovrhead] for choose. This means that there is no data.
You said that you do have data up until december 2019, if you mix up the fiscal date and calendar date in the model? or please check that if it is indeed that there is data in fiscal date aug 2019 in your power bi report.
If you still have problem, please share your sample pbix file for us have a test. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.
Regards,
Lin
Hello,
Thanks for you reply I updated the sample published report to allow for some fake actuals/masked actuals via card. I still can't post a sample pbix file.
You can see that if I sort by Budget Overhead first, I'm able to sort by month and get different values based on the month I've chosen.
I would use labor as there is guaranteed values for each month.
I just don't understand why selectedvalue fails.
These pictures are posted for proof of issue. Taken from
Thank you for the reply. There is data in the Aug 2019. I can filter that data no problem. Its just with this particular measure nothing shows up.
Do you know if there is a filter/slicer heirarchy could be affecting the model?
Like if I sort by category, and then apply the date filter, I lose the category filter?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |