Hi Fellow Power BI Users -
I’ve been following your tutorial ‘Data Bars in Table Visualizations - Significant Viz Update in Power BI’ and had a question.
I have an issue where if a particular month is selected in a filter, the data bar shading does not shade the full bar even if the achieved% is 100% or more Screen shot below)
The DAX measure:
% Achieved =
VAR investpcent =
DIVIDE ( [Adviser Selected Lodged FUM (All)], [All Adviser Lodged FUM Target], 0 )
VAR riskpcent =
DIVIDE ( [Adviser Lodged Premium (All)], [All Adviser Lodged Premium Target], 0 )
VAR totalvalue = riskpcent + investpcent
VAR investreturnvalue =
IF ( investpcent > 0, investpcent, "" )
VAR riskreturnval =
IF ( riskpcent > 0, riskpcent, "" )
VAR totalreturnval =
IF ( totalvalue > 0, totalvalue, "" )
RETURN
SWITCH (
TRUE (),
[New Business Lodgement Type] = "Investment", investreturnvalue,
[New Business Lodgement Type] = "Risk", riskreturnval,
totalreturnval
)
Adviser Selected Lodged FUM (All) =
CALCULATE (
[All Adviser Lodged FUM],
FILTER ( 'Access DB Lodgements', 'Access DB Lodgements'[Excluded FUM] = "No" )
)
Adviser Lodged Premium (All) =
CALCULATE (
SUM ( 'Access DB Lodgements'[Annual Premium/FUM] ),
FILTER (
'Access Active Advisers',
'Access Active Advisers'[Access Level] <> ""
),
FILTER (
'Access DB Lodgements',
'Access DB Lodgements'[Type] = "Risk"
)
)
All Adviser Lodged FUM Target =
CALCULATE (
SUM ( 'Access DB Targets'[trgtTargetValue] ),
FILTER (
'Access Active Advisers',
'Access Active Advisers'[Access Level] <> ""
),
FILTER (
'Access DB Targets',
'Access DB Targets'[trgDescrip] = "Lodgement"
&& 'Access DB Targets'[trgType] = "FUM"
)
)
All Adviser Lodged Premium Target =
CALCULATE (
SUM ( 'Access DB Targets'[trgtTargetValue] ),
FILTER (
'Access Active Advisers',
'Access Active Advisers'[Access Level] <> ""
),
FILTER (
'Access DB Targets',
'Access DB Targets'[trgDescrip] = "Lodgement"
&& 'Access DB Targets'[trgType] = "Premium"
)
)
Thanks in advance