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 September 15. Request your voucher.
Got a problem - Looking for a solution that will work if my table "AmountSharepointList" is coming from a SharepointOnline List and is not a manual/formulaic table. Tried a Calculated Column, but that wont work cause it needs to be dynamic. I have a what-if value (created off a What-If Parameter) and dates based off of a formulaic table created as Table:
Date = CALENDAR(DATE(2021,1,1),DATE(2021,12,31)
I have two possible routes & I dont care which one I use as long as one works!
FIRST: The "What-If Measure" in my picture ALMOST works, but it applys the what-if amount to every day instead of only those dates on the slicer. Any suggestions to make this formula work so it applies it only to the dates in the the What If dates Slicer?
WhatifMeasure = IF(
MAX('Date'[Date].[Date]) in ALLSELECTED(AmountSharepointList[Date].[Date]),
MAX(AmountSharepointList[Amount]) + [What-If Amount Value],
MAX(AmountSharepointList[Amount])
)
Another route: This is basically want I want to do but I know this formula won't work for a lot of reasons. I thought a roundabout approach might be to create two measures that state the start/end dates of my slicer and then incorporate those into some kind of formula?
IF (
AmountSharepointList[Date] >=SelectedMin && AmountSharepointList<=SelectedMax,
AmountSharepointList[Amount]+[What-if Amount],
AmountSharepointList[Amount]
)
Solved! Go to Solution.
@DataUser , Second one seems like column not measure and column can not take slicer values
You can have measure like
measure =
var _max = maxx(ALLSELECTED('Date'),'Date'[Date])
var _min = minx(ALLSELECTED('Date'),'Date'[Date])
return
IF(
MAX(AmountSharepointList[Date]) >=_min && MAX(AmountSharepointList[Date]) <=_max,
MAX(AmountSharepointList[Amount]) + [What-If Amount Value],
MAX(AmountSharepointList[Amount])
)
Thank you! I had to adjust it a tiny bit because for some reason the <= didn't pick up the equal sign on the Var _max, but, amazing. Thanks!
@DataUser , Second one seems like column not measure and column can not take slicer values
You can have measure like
measure =
var _max = maxx(ALLSELECTED('Date'),'Date'[Date])
var _min = minx(ALLSELECTED('Date'),'Date'[Date])
return
IF(
MAX(AmountSharepointList[Date]) >=_min && MAX(AmountSharepointList[Date]) <=_max,
MAX(AmountSharepointList[Amount]) + [What-If Amount Value],
MAX(AmountSharepointList[Amount])
)
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
30 |
User | Count |
---|---|
181 | |
88 | |
71 | |
48 | |
46 |