Forum Discussion
include extra column - target
- 1 year ago
Hello jps_HHH
try this solution
Custom Column =
UNION(
SELECTCOLUMNS('DateTable', "Month", FORMAT('DateTable'[Date], "MMM YYYY")),
DATATABLE("Month", STRING, {{"Target"}})
)
Update your value measure like this
Final Value =
VAR SelectedKPI = SELECTEDVALUE('Measures Table'[Key Performance Indicator])
VAR CurrentCol = SELECTEDVALUE('Month_Column_Table'[Month])
RETURN
SWITCH(
TRUE(),
CurrentCol = "Target",
SWITCH(
SelectedKPI,
"year Sales", [year Sales Target],
"Training", [Training Target],
"Quality", [Quality Target]
),
-- Else return monthly values
SWITCH(
SelectedKPI,
"year Sales", CALCULATE([year Sales], 'DateTable'[MonthYear] = CurrentCol),
"Training", CALCULATE([Training], 'DateTable'[MonthYear] = CurrentCol),
"Quality", CALCULATE([Quality - Issues/Batch], 'DateTable'[MonthYear] = CurrentCol)
)
)
Thanks,
Pankaj Namekar | LinkedInIf this solution helps, please accept it and give a kudos (Like), it would be greatly appreciated.
Hi jps_HHH,
As we haven’t heard back from you, we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu
Hi @jps_HHH,
As we haven’t heard back from you, we would like to follow up to see if the solution provided by the super user resolved your issue. Please let us know if you need any further assistance.
If our super user response resolved your issue, please mark it as "Accept as solution" and click "Yes" if you found it helpful.
Regards,
Vinay Pabbu