Forum Discussion

luciefialova's avatar
luciefialova
Frequent Visitor
8 years ago
Solved

Getpivotdata equivalent

Hi,   Is there a Power BI equivalent to the getpivotdata function in Excel? Some teams within my organisation have quite messy reporting requirements (asking me to count apples and oranges) and in ...
  • v-ljerr-msft's avatar
    v-ljerr-msft
    8 years ago

    Hi luciefialova,

     

    I would suggest you start to learn DAX language which could calculate all the expected result for you in Power BI without return back to SQL. And it's better to read a book from beginning. :smileyhappy:

     

    In addition, the formula(DAX) below to calculate the sum of the two totals mentioned above is for your reference.

    Measure =
    SUMX (
        SUMMARIZE (
            'Attributes',
            'Attributes'[ATTRUBUTE_TYPE],
            "count of people", COUNTROWS ( Attributes )
        ),
        [count of people]
    )
        + SUMX (
            SUMMARIZE (
                'transactionCF',
                'transactionCF'[CAMPAIGNCODE],
                "count of people", COUNTROWS ( transactionCF )
            ),
            [count of people]
        )
    

    Regards