Forum Discussion

Emerald70's avatar
Emerald70
Frequent Visitor
1 year ago

facing an issue adding measures in the table

QualifyTypeAmount
YActual2000
YForecast3000
NActual50000
NForecast10000

have a data like this 
and needed a below 4 measures to be added in the table,  but when iam adding all facing an error like "could not load data for the visual"  please help??

QNA = calculate( sum(Sheet1[Amount]), Sheet1[Qualify] = "N" && Sheet1[Type] = "Actual")
QNF = calculate( sum(Sheet1[Amount]), Sheet1[Qualify] = "N" && Sheet1[Type] = "Forecast")
QYA = calculate( sum(Sheet1[Amount]), Sheet1[Qualify] = "Y" && Sheet1[Type] = "Actual")
QYF = calculate( sum(Sheet1[Amount]), Sheet1[Qualify] = "Y" && Sheet1[Type] = "Forecast")

5 Replies

  • Hi Emerald70 
    The formulas seem correct + work with the small table that you attached

    May be the problem is with the data model or something.
    What is a data source?
    Do you use an import mode or direct query?

     

  • Emerald70's avatar
    Emerald70
    Frequent Visitor

    Try to keep 4 measures in a table and check with the same data

  • Hi,

    In the Query Editor, ensure that the data type of the Amount column is Number.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Emerald70 , hello Ashish_Mathur and Ritaf1983, thank you for your prompt reply!

     

    I'm checking how the things are going on about this issue. Whether the answer helps you?

     

    If you find any answer is helpful to you, please remember to accept it.

     

    It will help others who meet the similar question in this forum.

     

    Thank you for your understanding.