Menu
Stuff by Yuki
  • Home
  • Python
  • Power BI
  • Tableau
  • Community
    • Makeover Monday
    • Workout Wednesday
  • About
Stuff by Yuki

How Do You Create DAX Tables?

Posted on May 19, 2021July 28, 2021

WoW 2021 Week20 – Power BI

Workout Wednesday exercises are always great! This time I created tables utilizing DAX SUMARRIZE function. I didn’t have much experience with that function prior, but it seems pretty straight forward.

CALCULATE function comes in to play for a lot of cases.

Here is some code I created to get the percentage sales for each year so as to using it in a bar chart showing the percentage by region.

Total Sales - DAX Table 2 = CALCULATE( [Sum of Sales], ALLEXCEPT( orders, orders[Year] ))
DAX Table 2 = SUMMARIZE (
        orders,
        orders[Year],
        orders[region],
        "Sales", [Sum of Sales],
        "Total Sales", [Total Sales - DAX Table 2],
        "% Total Sales",
            DIVIDE (
                [Sum of Sales],
                [Total Sales - DAX Table 2]
    ))

DAX is really flexible in that you can adjust it depending on how you need to show your data. The more you work with DAX, the better you understand how it works in each case!

Data Source | Source Code

Post Views: 31

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts

  • A Running Total Calculation with Quick Measure in Power BI
  • How To Copy And Paste Report Page in Power BI
  • How to Fill Dates Between Start Date and End Date in Power BI (Power Query)
  • How to Create an Information Panel in Power BI
  • My Experience Passing DA-100 Exam – Microsoft Certified: Data Analyst Associate

Recent Posts

  • How I Passed AWS Certified Developer Exam (DVA-C01)
  • Network Visualizations in Python – Introduction to NetworkX and Pyvis
  • DAX.do is a sandbox for DAX
  • Python Pandas .apply() function – how does it differ from .applymap() and .map()?
  • How To Copy And Paste Report Page in Power BI

connect with me

  • LinkedIn
  • Twitter
  • Github
©2022 Stuff by Yuki | Powered by SuperbThemes & WordPress