Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
push
Frequent Visitor

DAX related

hello guys, 
i am new in power bi  and i am facing some issues in DAX (CALCULATE()  FUNCTION).

i had created one measure with the following dax query : -

sales =
    CALCULATE(
        SUMX(
        'Table 1',
        'Table 1'[quantity ]*'Table 1'[net price ]
    ),
     'Table 1'[brand] = "bagga buggy"
    )
i am getting this output : - 
push_1-1662112258650.png

 


so the issue is this : - 
when i am adding year column in my visualization the data is also filtered out through YEAR in addition with "table 1"[brand] = "bagga buggy"  (which i had mentioned in above dax query).

Since  "table 1"[brand] = "bagga buggy" Internally this should work like this "FILTER(ALL('TABLE 1'),'table 1'[brand] = "bagga buggy" ) " 

WITH "table 1"[brand] = "bagga buggy"                                        

push_3-1662112666606.png

 

  WITH  "FILTER(ALL('TABLE 1'),'table 1'[brand] = "bagga buggy" )" 

 

push_4-1662112696470.png

 

CAN ANY ONE HELP ? 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @push ,

Whether the "the total of this measure" you mean is a yellow label for the image:

vyangliumsft_0-1662446563223.png

Here are the steps you can follow:

1. Create measure.

Total =
var _table=SUMMARIZE('Table','Table'[Group],"Value",[Measure])
return
IF(
    HASONEVALUE('Table'[Group]),[Measure],SUMX(_table,[Value]))

2. Result:

vyangliumsft_1-1662446563224.png

If you need pbix, please click here.

DAX related.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi  @push ,

Whether the "the total of this measure" you mean is a yellow label for the image:

vyangliumsft_0-1662446563223.png

Here are the steps you can follow:

1. Create measure.

Total =
var _table=SUMMARIZE('Table','Table'[Group],"Value",[Measure])
return
IF(
    HASONEVALUE('Table'[Group]),[Measure],SUMX(_table,[Value]))

2. Result:

vyangliumsft_1-1662446563224.png

If you need pbix, please click here.

DAX related.pbix

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Tahreem24
Super User
Super User

@push Create this measure,

MEASURE = CALCULATE
                         (  SUM('Table 1'[quantity ])*SUM('Table 1'[net price ]),
                           FILTER(Table 1, 
'Table 1'[brand] = "bagga buggy")
                          )

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard

Thanks for your effort,
but the total of this measure

will be incorrent 

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

Check out the May 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.