cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Parthsh93
Helper IV
Helper IV

Target values with ISFILTERED

Hi all

 

Here is a screen recording to my problem statement 

 

Sample Data:

 

Plant ClusterPlant UnitOrigin NameTarget Test.LBV_targetTarget Test.LBW_TargetLoadability Weighted
NORTHBIHARPurnia Depot718320964.3297.91%
NORTHNORTH EASTFatuha Depot7730911220.6797.03%
NORTHODISHARourkela Depot225762374.3697.00%
NORTHODISHAKhurda Depot285980383.1596.02%
NORTHBIHARPatna Depot4703531235.7895.74%
NORTHNORTH EASTGourpuri Depot5866021182.8695.09%
NORTHJHARKHANDRanchi New Depot6797281140.7295.02%
WESTPUNEKolhapur Depot84564155.5294.69%
SOUTHVIZAGVizag Depot477480671.2494.15%
NORTHSILIGURIAsansol Depot96855156.7593.94%
WESTNASIKAurangabad Depot9702121332.4892.92%
NORTHODISHAKhorda18401502576.2192.75%
NORTHSILIGURIDC Fatapukur578277891.8792.25%
SOUTHVIJAYAWADAAtmakuru20347742513.791.84%
NORTHEAST UPKanpur Co-pack Water395458625.191.69%
SOUTHHYDERABADAmeenpur25131673455.1591.67%
WESTGOAGoa16517074789.16%
NORTHJAMMUBB Depot70672567.988.60%
SOUTHCHITTOORSrikalahasti8857601259.4488.24%
WESTRAJASTHANKaladhera7294951509.388.17%
SOUTHKARNATAKABidadi Plant8608028888.15%
WESTRAJASTHANUdaipur Depot202464395.1687.76%
NORTHWEST UPDasna30496625092.287.39%
WESTMADHYA PRADESHBhopal7373341596.6686.15%
SOUTHTAMIL NADUGangaikondan Copack233520483.7285.43%
SOUTHKARNATAKABangalore-Bidadi-DPG20646503053.685.38%
NORTHEAST UPKanpur Depot455390685.184.88%
NORTHJAMMUJammu37281251.4384.56%
SOUTHTAMIL NADUCoimbatore Depot151041519.3984.37%
SOUTHTAMIL NADURedhills Depot7008542100.1284.14%
SOUTHKERALACochin Depot76560487.283.12%
SOUTHTAMIL NADUNemam227672336.1682.85%
NORTHWEST UPJhilmil Depot31416292.7481.87%
SOUTHHYDERABADHimjal Copack496384941.881.82%
SOUTHHYDERABADMaula Ali Depot303606781.5681.46%
SOUTHHYDERABADBowrampet Depot - NKA51756358.6680.85%
SOUTHKARNATAKABidadi Plant 2158015141.9678.67%
SOUTHKARNATAKABharatiyam Copack191820248.476.17%
SOUTHHYDERABADBowrampet Depot - GT10440044473.68%
SOUTHKARNATAKASouth KP Road Depot5894189.4544.62%

 

Measures in question:

 

Target Value  LBW = IF(
    ISFILTERED('Prototype Modeling_Freight'[Origin Name]),CALCULATE(VALUES('Prototype Modeling_Freight'[Target Test.LBW_Target])),
        IF(ISFILTERED('Prototype Modeling_Freight'[Plant Unit]),CALCULATE(VALUES('Prototype Modeling_Freight'[TArget Test_PU.LBW_Target_PU])),BLANK()))
        

 

 

Any commnet or suggestion is welcomed

TIA

 

@Anonymous 

@Greg_Deckler 

 

@nandukrishnavs 

1 ACCEPTED SOLUTION

@Parthsh93  Okay, Then try to use HASONEVALUE()  instead of ISFILTERED() 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

5 REPLIES 5
nandukrishnavs
Community Champion
Community Champion

@Parthsh93 

 

If the user select multiple values, what is the expected output?

 

For example, I have used SUM() instead of VALUES().

 

Try this

Target Value  LBW =
IF (
    ISFILTERED ( 'Prototype Modeling_Freight'[Origin Name] ),
    CALCULATE (
        SUM ( 'Prototype Modeling_Freight'[Target Test.LBW_Target] )
    ),
    IF (
        ISFILTERED ( 'Prototype Modeling_Freight'[Plant Unit] ),
        CALCULATE (
            SUM ( 'Prototype Modeling_Freight'[Target Test.LBW_Target] )
        ),
        BLANK ()
    )
)

Change the logic based on your actual requirement.



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂

 


Regards,
Nandu Krishna

@nandukrishnavs 

 

When multiple filters are selected, I want the gauge to show no target values.

 

according to your suggestion of using when using (SUM) target values have stopped showing

@Parthsh93  Okay, Then try to use HASONEVALUE()  instead of ISFILTERED() 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

@nandukrishnavs 

Thank you very much. rescued me again 🙂

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors