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.
I have charge date (which is first day of each month) as column , and month wise column (first day of each month ) and stocks column.
i need if i select one month in date slicer (charge date) for example(01/03/2018) .
it should show future stocks value from stock column from 01/03/2018(month wise column) to 01/12/2018 (month wise column). (blue colour mentioned in future stock)
and it should show actual stock value from stock column - previous month of (month wise column) (01/01/2018 and 01/02/2018)(blue colour mentioned in actual stock )
and it dynamically take the values from previous month of selected charge date for future stock (mentioned in yellow colour )
i want to show it in line chart (actual stock and future stock).
please help me out 🙏
The data values are:
Solved! Go to Solution.
Hi @sarath_chandra ,
Please try:
First create a new table for slicer:
Then apply these measures:
future stocks =
VAR _a =
EDATE ( SELECTEDVALUE ( 'For slicer'[charge_date] ), -1 )
VAR _b =
CALCULATE (
MAX ( 'Table'[stocks] ),
FILTER (
ALL ( 'Table' ),
[charge_date] = _a
&& [month-wise] = MAX ( 'Table'[month-wise] )
)
)
RETURN
IF (
MAX ( 'Table'[month-wise] ) < SELECTEDVALUE ( 'For slicer'[charge_date] ),
_b,
MAX ( 'Table'[stocks] )
)
Actual Stocks =
IF (
MAX ( 'Table'[month-wise] ) < SELECTEDVALUE ( 'For slicer'[charge_date] ),
MAX ( 'Table'[stocks] )
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sarath_chandra ,
Please try:
First create a new table for slicer:
Then apply these measures:
future stocks =
VAR _a =
EDATE ( SELECTEDVALUE ( 'For slicer'[charge_date] ), -1 )
VAR _b =
CALCULATE (
MAX ( 'Table'[stocks] ),
FILTER (
ALL ( 'Table' ),
[charge_date] = _a
&& [month-wise] = MAX ( 'Table'[month-wise] )
)
)
RETURN
IF (
MAX ( 'Table'[month-wise] ) < SELECTEDVALUE ( 'For slicer'[charge_date] ),
_b,
MAX ( 'Table'[stocks] )
)
Actual Stocks =
IF (
MAX ( 'Table'[month-wise] ) < SELECTEDVALUE ( 'For slicer'[charge_date] ),
MAX ( 'Table'[stocks] )
)
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for reply . Great working perfectly. awesome to learn from you.
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 | |
98 | |
86 | |
70 | |
62 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |