Cognos Analytics

 View Only
Expand all | Collapse all

DAX measure to Cognos calculation

  • 1.  DAX measure to Cognos calculation

    Posted Fri June 02, 2023 09:48 AM
    Ventes AAD =
        CALCULATE([Ventes PlageDate],
            DATESBETWEEN(dim_Calendrier[Date],
                DATE(YEAR(TODAY()), 1, 1),
                DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY()))-1))

    ** Ventes PlageDate = SUM(fact_Ventes[TOTAL_AMOUNT])


    how to recreate this in a cognos calculation
    -Kayed


    ------------------------------
    Kayed Chehade
    ------------------------------


  • 2.  RE: DAX measure to Cognos calculation

    Posted Mon June 05, 2023 10:10 AM

    Something like this should work:

    TOTAL( 
       IF ( _make_timestamp( extract( year, current_date ), 1, 1 ) <= DateColumn 
            and 
            DateColumn <= _add_days( current_date, - 1 ) ) 
       THEN ( ValueColumn )     
       ELSE ( null )
    )



    ------------------------------
    Milan Milovanovic
    ------------------------------