How to use ALL Dax Function in Power BI | Power BI DAX Tutorial Series| Interview question

Sdílet
Vložit
  • čas přidán 20. 07. 2022
  • This Power BI tutorial describes How to use ALL Dax Function in detailed manner .We have tried explaining all dax function in power bi with step by step easy examples.
    Step 1: Usage of ALL DAX : It clears all applied filters in power bi primarily from a table /Column.
    Step 2:Lets see the syntax: ALL ({table or column, [column], [column] …})
    Step 3: Lets us consider the example where i use the Financial Excel file to demonstrate the results to you .Over here lets drag and drop the Country and Sales Column in the Visual .
    Also we have given two outer Slicers of Country and Year and now wish to calculate the total for all Counties combined in each row .To accomplish this we need to ignore the filter context inside the visual that comes for each county. Hence we use the ALL function and provide the country column inside this as shown below .This ignores all the filters (visual level as well as slicer level)
    ALL Sales =
    CALCULATE(
    SUM(financials[ Sales]),
    All(financials[Country])
    )
    Step 4 :
    It can be used to calculate the percentage sales as shown below:
    Sales % =
    CALCULATE(
    sum(financials[ Sales])/
    financials[ALL Sales]
    )
    Step 5 : It can also be used to create tables as shown below.
    Now lets take a look at all dax guide:
    Important Interview Question : Does ALL ignores or respect Page Level Filter ?
    Answer: ALL is very powerful DAX Function in Power BI. Even if you apply a page level Filter ALL ignores it.
    Simple .Isn't it ?
    For more details do visit my vlog below :
    powerbizone.com/step-by-step-...
    #powerbi #powerbitraining #powerbidax #powerbi_training #daxfunctions #powerbizone
    Chapters:
    0:12 :Introducing ALL DAX Function in Power BI
    0:45 Explanation with Example 1
    1:44 How to get Total Sales row wise
    2:52 How to calculate % Sales using ALL Dax Function in Power BI
    4:48 Power bi interview question
    5:50 Explanation with Example 2
    Check out other Power BI Tutorials Videos :
    1.SamePeriodLastYear with Example: • difference between par...
    2.How to Calculate Running Totals: • How to calculate runni...
    3.Duplicate Vs Reference : • power bi difference be...
    4.Merge Vs Append: • power bi difference be...
    5.Calculate Function in DAX Power BI: • What is Calculate Func...
    6.Filter Function in Power BI: • Filter Function in Pow...
    7.Row Vs Filter Context: • Row Context Vs Filter ...
    Learn Power BI through our vlog and Free Videos:
    powerbizone.com/category/arti...
    Download the File for your practice from the below link:
    drive.google.com/file/d/10WH8...

Komentáře • 6

  • @powerbizone
    @powerbizone  Před 2 lety +1

    Download the File for your practice from the below link:
    drive.google.com/file/d/10WH8PrY2MQSjzwTDNbmdF5O1yvDWQfNR/view?usp=sharing

  • @user-sq2sm6tb4g
    @user-sq2sm6tb4g Před 3 měsíci +1

    very nice explanation sir..thanks for making useful videos

    • @powerbizone
      @powerbizone  Před 2 měsíci

      Thank you for taking the time and commenting whch helps a creator to know if he is going n the right drection . :)

  • @ishaqkhan8653
    @ishaqkhan8653 Před 2 měsíci

    Hi, thank you for the video,
    I have a question , let us say I want to exclude both the filters in the table shown. Can we do that.
    So the formula would be
    AllSales = calculate( sum(financials[Sales]), all(financials[country]), all (financials[year])
    I am assuming that year column belongs to the 'financials' table. is it possible to add 2 or more filters in the all function calculation?

  • @udaayshahhi7256
    @udaayshahhi7256 Před 2 lety +1

    Hi, Thanks for the lecture.
    I have a question.
    Is there a way to display values other than the expression that we have specified in the calculate function?
    The result is correct but instead of sales amount can we make it show something else like the name of the country?
    Thank you

    • @powerbizone
      @powerbizone  Před 2 lety

      Hi Udaay .Thank you for your question .Although you can use dimensional values but you need to be very careful about the logic since people generally use sales, profit in the expression and not dimensional values .However it wont return you an error .I tried the below code and it did give me results although the logic might be questioned .Have a great day !
      Test Measure =
      CALCULATE(
      MAX(financials[Country]),
      All(financials[Country])
      )