Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
fabiofurlanbr
Frequent Visitor

Help - Measure in IF Dax don't show total

Hello , please i need your help for the question below.

I need show the total for the measure (calcular_qtd_lic_backup) , but i couldn't.

 

Thanks  a lot

 

calcular_qtd_lic_backup =
    var _qtd_lic_aplicada =  [calcular_qtd_lic_aplic]
    var _qtd_lic_nota = SELECTEDVALUE(Merge1[Sistema.1.Quantidade Lic])
    var _compara_lic =
        if( _qtd_lic_nota < _qtd_lic_aplicada,
        0,
        1
    )
    RETURN
    if (_compara_lic = 1 ,
     _qtd_lic_nota - _qtd_lic_aplicada,0
     )
 
=======
 
calcular_qtd_lic_aplic =
    var _qtd_lic_aplic = CALCULATE(COUNT(Merge1[Sistema]),
        FILTER(Merge1,Merge1[Sistema.1.Mês_Ref]),
        FILTER(Merge1,Merge1[Lic_Ativa_Desativada]="Ativo")
    )
RETURN
_qtd_lic_aplic
fabiofurlanbr_0-1680354562821.png
1 ACCEPTED SOLUTION
MohammadLoran25
Solution Sage
Solution Sage

Hi @fabiofurlanbr ,

I could not understand your fields because of lack of data. But the reason that it happens is for the SELECTEDVALUE function.

 

Btw, to fix your problem, you can create a new measure below:

 

NewMeasure =
VAR _TABLEE =
    ADDCOLUMNS ( 'TheTableyouwant', "@BackupMeasure", [calcular_qtd_lic_backup] )
RETURN
    SUMX ( _TABLEE, [@BackupMeasure] )

 

 

For the 'TheTableyouwant' you have to insert your desired table. I think you need to use SUMMARIZE function to achieve sth that you have in your table visual.

 

Then it would give you the desired result.

 

If this answer solves your problem, give it a thumbs up and accept it as a solution so the others would find what they need easier.

Regards,

Loran

View solution in original post

2 REPLIES 2
MohammadLoran25
Solution Sage
Solution Sage

Hi @fabiofurlanbr ,

I could not understand your fields because of lack of data. But the reason that it happens is for the SELECTEDVALUE function.

 

Btw, to fix your problem, you can create a new measure below:

 

NewMeasure =
VAR _TABLEE =
    ADDCOLUMNS ( 'TheTableyouwant', "@BackupMeasure", [calcular_qtd_lic_backup] )
RETURN
    SUMX ( _TABLEE, [@BackupMeasure] )

 

 

For the 'TheTableyouwant' you have to insert your desired table. I think you need to use SUMMARIZE function to achieve sth that you have in your table visual.

 

Then it would give you the desired result.

 

If this answer solves your problem, give it a thumbs up and accept it as a solution so the others would find what they need easier.

Regards,

Loran

@MohammadLoran25 

 

 

Thanks a lot , you're absolutely right, summarize function solved my problem.

 

 

Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.