Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Calculation Divide two Fact tables is giving wrong output

hi,

have this measure: (show translation version):

VAR _CALC = DIVIDE
('Fact_Sales'[Gross Invoiced Sales EUR TY],'Fact_Sales budget'[Budget gross invoiced sales EUR YTD])

RETURN
/*IF( NOT(ISBLANK( _CALC ) ), _CALC, 0) */
_CALC

but if you look at this output than it is wrong:

the first column with the percentage should be 90.1%.

anyone ideas how this can be solved

thnx

  • Anonymous's avatar
    Anonymous
    3 years ago

    it is a measure as you can see:

    Budget gross invoiced sales EUR YTD=

    VAR _MONTH = MONTH(TODAY())
    RETURN CALCULATE([Budget monthly gross invoiced EUR], [Dim_InvoiceDate][Month nr]<=_MONTH)

7 Replies

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

    Hi Anonymous 

    What do you get when you place [Budget gross invoiced sales EUR YTD] in the same table visual?

    • Anonymous's avatar
      Anonymous
      Not applicable

      it is a measure as you can see:

      Budget gross invoiced sales EUR YTD=

      VAR _MONTH = MONTH(TODAY())
      RETURN CALCULATE([Budget monthly gross invoiced EUR], [Dim_InvoiceDate][Month nr]<=_MONTH)

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

        Anonymous 

        The 5th column in the table visual is [Budget monthly gross invoiced EUR] not [Budget gross invoiced sales EUR YTD]

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Tamerj1

    it is already in, see the 5th column Budget Total gross invoiced YTD

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

      Anonymous 

      Are you sure you have created a measure not a column? All of them are measures?