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.
Need to replicate 89.23 in all months
Solved! Go to Solution.
@Anonymous you can do this by creating a calculated column
Revenue_Filled =
VAR _currentDate = MAX('Calendar'[Date])
VAR _lastNonBlankDate =
CALCULATE(
MAX('Calendar'[Date]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] <= _currentDate &&
NOT(ISBLANK(Price_Index_Query[Price_Index_Working]))
)
)
RETURN
CALCULATE(
MAX(Price_Index_Query[Price_Index_Working]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] = _lastNonBlankDate
)
)
This formula works by finding the last date that has a non-blank revenue value for each row, and then returning the revenue value for that date. This way, the blanks are filled with the previous non-blank value until a new non-blank value is encountered.
Let me know is this work
@ me in replies or I'll lose your thread!!!
Thanks
@Anonymous you can do this by creating a calculated column
Revenue_Filled =
VAR _currentDate = MAX('Calendar'[Date])
VAR _lastNonBlankDate =
CALCULATE(
MAX('Calendar'[Date]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] <= _currentDate &&
NOT(ISBLANK(Price_Index_Query[Price_Index_Working]))
)
)
RETURN
CALCULATE(
MAX(Price_Index_Query[Price_Index_Working]),
FILTER(
ALL('Calendar'),
'Calendar'[Date] = _lastNonBlankDate
)
)
This formula works by finding the last date that has a non-blank revenue value for each row, and then returning the revenue value for that date. This way, the blanks are filled with the previous non-blank value until a new non-blank value is encountered.
Let me know is this work
@ me in replies or I'll lose your thread!!!
Thanks
Thank you very much for the response .it works
User | Count |
---|---|
25 | |
12 | |
8 | |
8 | |
7 |
User | Count |
---|---|
28 | |
13 | |
12 | |
12 | |
6 |