Forum Discussion

LH09's avatar
LH09
Regular Visitor
2 years ago
Solved

Need assistance with DAX Calculation

Hi Everyone

 

I need your assistance with fixing this dax formula, 

CALCULATE(SUM(Award Vouchers Counts) SUMX(HCVP_Resident_Demographic,HCVP_Resident_Demographic[Leased+Issued])))
 
The goal: I have special award vouchers with a count of the number of vouchers for each award. I have Residents leased and vouchers issued and i need to get the potental number of vouchers remaining. 
Ex. Specail Award Count =70 , Leased Residents =50 , Number of vouchers issued = # of Potential vouchers remaining
 
I appreciate any assistance given. thank you LH

 

 

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi LH09 

     

    I've tried to create some sample data to solve your problem:

     

    Just like Greg_Deckler says, this measure should solve your problem

    Measure = SUM('Show button if I select a value in table'[Award Vouchers Counts]) - SUM('Show button if I select a value in table'[Leased+Issued])

     

     

    Or you might consider using the following calculated columns:

    Column = [Award Vouchers Counts] - [Leased+Issued]

     

     

     

    If your table structure is different from the example table I created, please provide your sample pbix file.

     

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity Champion

    LH09 I'm not sure what that formula is, do you want this?

     

    SUM('Table'[Award Vouchers Counts]) - SUM('HCVP_Resident_Demographic'[Leased+Issued])

     

  • LH09's avatar
    LH09
    Regular Visitor

    Hi Greg,

    I appreciate your assistance. I tried your formula suggestion unfortunately it did not work. 

     

    Thank you so much LH

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi LH09 

     

    I've tried to create some sample data to solve your problem:

     

    Just like Greg_Deckler says, this measure should solve your problem

    Measure = SUM('Show button if I select a value in table'[Award Vouchers Counts]) - SUM('Show button if I select a value in table'[Leased+Issued])

     

     

    Or you might consider using the following calculated columns:

    Column = [Award Vouchers Counts] - [Leased+Issued]

     

     

     

    If your table structure is different from the example table I created, please provide your sample pbix file.

     

     

     

     

     

    Best Regards,

    Jayleny

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.