locked
How to add extra column with measure to DAX table query RRS feed

  • Question

  • I have a table in Excel 2013 generated via a DAX query. Is it possible to add a column with a non-related measure to that table (I want the measure value to repeat on all rows)?

    EVALUATE
         FILTER(
          SUMMARIZE(
             OpenOrders,
             OpenOrders[Symbol],
             OpenOrders[Type],
             OpenOrders[OpenPrice]
          ),
          OpenOrders[Symbol]="EURUSD" && OpenOrders[Type]="Buy" || OpenOrders[Symbol]="EURUSD" && OpenOrders[Type]="Sell"
       )
    ORDER BY [Symbol], [OpenPrice] DESC
    
    + column "Rates[CurrentRate_EURUSD]"

    TIA!

    Re

    Dennis

    • Edited by sgude1 Wednesday, December 18, 2013 3:48 AM Clarify
    Monday, December 16, 2013 4:49 PM

Answers

  • Never mind, I made it work by inserting the code for the measure in the query instead of the measure itself.

    EVALUATE
       FILTER(
          ADDCOLUMNS(
             SUMMARIZE(
                OpenOrders,
                OpenOrders[Symbol],
                OpenOrders[Type],
                OpenOrders[OpenPrice]
             ),
             "CurrenRate", CALCULATE(SUMX(TOPN(1,Rates,Rates[RateTime],0),[Ask]),FILTER(Rates,Rates[Symbol]="EURUSD"))
          ),
          OpenOrders[Symbol]="EURUSD" && OpenOrders[Type]="Buy" || OpenOrders[Symbol]="EURUSD" && OpenOrders[Type]="Sell"
       )

    Re

    Dennis

    • Marked as answer by sgude1 Wednesday, December 18, 2013 8:47 AM
    Wednesday, December 18, 2013 8:46 AM