Thursday, May 2, 2019

Power BI DAX #3: VALUES, another must know DAX formula

One common situation sales analysts face is capturing newly introduced products or SKUs or Region or Sales Rep in their reports. In Excel, you'll have to do something extra -- and if you are not an Excel ninja, that something extra can be very significant and time costly.

With Power BI, you might not need to do anything extra if you are good with using VALUES.

CASE STUDY
You are the sales analyst for Mega Pizza. Everyday you report sales by branch. But every couple of months, a new branch is opened. On the ERP the sales for each new branch is automatically captured, but on your report you'll have to include this new branch and assign it the general target given to all branches.

How will you achieve this automatically in Power BI without having to do any extra/manual intervention when a new branch is live.

ANSWER: VALUES

First, a screenshot of what the transaction data from the ERP looks like.



We are going to create a new table from this table extracting the unique list of branches from the ERP live data table. And that's exactly what VALUES does. 

VALUES is the DAX formula that extracts a unique list of records from a table or column. You can read more about it from Microsoft Documentation: https://docs.microsoft.com/en-us/dax/values-function-dax

There is also DISTINCT but VALUES allows for referential integrity check which makes it a better choice for most tasks. If you read through the documentation link I gave you'll get a more thorough explanation of what I mean by referential integrity check and practical difference between VALUES and DISTINCT.

And here's how to use VALUES for the scenario I just described.

Branch Targets = VALUES('Pizza Sales Data'[Branch])



And to finally make it meaningful. I add a New Column that assigns the target all branches are given (assuming Mega Pizza doesn't discriminate in its target allocation). :)


You can watch the YouTube tutorial: https://youtu.be/pLZhm0R2KrU






Enjoy!

And to join our training class, visit https://www.urbizedge.com/powerbi

15 comments:


  1. Nice post. Thanks for sharing! I want people to know just how good this information is, It’s interesting content and Great work.
    360DigiTMG digital marketing course hyderabad

    ReplyDelete
  2. Understanding its crucial values for performing advanced calculations and enhancing the report regarding on the content. Moreover availing the best MBA essay writing services for scoring the top results and complete all projects effectively.

    ReplyDelete
  3. Excellent post. Thank you for sharing! I want individuals to recognize the quality of chicken jockey clicker this information; it is compelling content and exemplary effort.

    ReplyDelete
  4. I love how moto x3m adds soft obstacles like conveyors and spring pads that slow the bike down. It forces me to rethink my speed and adds depth to every course.

    ReplyDelete
  5. I never imagined a no-internet screen could be so fun! dinosaur game turns frustration into a thrilling mini-adventure—simple, addictive, and always there when the Wi-Fi lets me down.

    ReplyDelete
  6. Great DAX tip! VALUES is definitely key for dynamic reporting. For Mega Pizza, it avoids manual updates as new branches appear. Instead of static lists, Power BI adapts. Now, for a fun twist while you're snowed in playing Snow rider , try imagining each branch as a level! Perhaps VALUES to track level unlocks... food for thought!

    ReplyDelete
  7. A rhythm-based labyrinth that pays tribute to music-driven gaming
    geometry dash lite

    ReplyDelete
  8. This post offers excellent insights into data analysis and practical applications. Just like clear data presentation, working with a UK best book editing company ensures your writing is precise, polished, and impactful.

    ReplyDelete
  9. The challenge of tracking newly introduced products using DAX is so common. Does using `VALUES` here help solve the context filtering issue when combining it with `CALCULATE`? google Nana Banana

    ReplyDelete
  10. This is a great illustration of why DAX is so powerful! It's amazing how VALUES can simplify what would be a headache in Excel. I remember having a similar issue tracking website visits and new content. It felt like trying to navigate a crazy maze, a bit like the constant motion in Run 3

    ReplyDelete
  11. Drifting in Drift Hunters is not automatic. Players must understand how speed, angle, and throttle work together.

    ReplyDelete
  12. Balancing multiple deadlines can be challenging, and sometimes students search for resources like do my assignment to better understand expectations and improve their work quality. When used responsibly, academic guidance can provide clarity, structure, and helpful insights that support independent learning and stronger overall performance.

    ReplyDelete
  13. Very helpful explanation of the 3 VALUES pattern in DAX. I like how the examples make a complex concept much easier to understand and apply in real Power BI reports.
    drift hunters

    ReplyDelete
  14. To make the character jump, players press either the space bar or the left mouse button. If they hold down either button, the character will jump again. This way of controlling won't be the same all the way through the level, since the button acts differently based on the character's shape. Play geometry dash subzero

    ReplyDelete
  15. I remember countless hours spent manually updating reports in my previous role when new products launched. It was a tedious cycle. Finding tools that automate these processes, like Power BI, is a game-changer. For a fun, creative break from data, I often dabble in Infinite Craft, which also highlights how seemingly simple elements can combine into complex outcomes. This experience underscores the value of efficient data management.

    ReplyDelete