How do I get my DAX measure to calculate grouped values

0 votes

I need help with a DAX measure in my Power BI report. I am just learning about measures, so sorry if this seems like a newbie question.

I have a simple DAX measure that I use to calculate water usage for each location/sensor, for the current date range selected in the report (via Timeline control):

Usage:= (MAX([Reading]) - MIN([Reading]))

How can I get the measure to calculate the usage, grouped by the Sensor ID?

Oct 8, 2020 in Power BI by anonymous
• 8,910 points
516 views

1 answer to this question.

0 votes

Try this:

Total Usage:= SUMX( VALUES(MyTable[SensorID]), [Usage])

An alternative solution:

Total Usage:= SUMX( SUMMARIZE(MyTable, MyTable[SensorID]), [Usage])

It works the same way, only the list of unique sensor ids is returned by the SUMMARIZE function instead of VALUES.

answered Oct 8, 2020 by Gitika
• 65,910 points

Related Questions In Power BI

0 votes
3 answers

How do I get token using javascript API while trying to embed graphs using Power BI

Use ADAL.js that will give you an ...READ MORE

answered Jun 22, 2019 in Power BI by anonymous
4,188 views
0 votes
1 answer

How to measure in DAX to calculate YTD for chosen month only for Power BI?

If you use the date column from FactTable, ...READ MORE

answered Dec 22, 2020 in Power BI by Gitika
• 65,910 points
4,494 views
0 votes
1 answer

How do I know who in my organization has a Power BI account?

You can view the Azure Active Directory ...READ MORE

answered Oct 15, 2018 in Power BI by Hannah
• 18,570 points
896 views
0 votes
1 answer

How can I concatenate grouped values in PowerQuery ?

If your table is Source, and if ...READ MORE

answered Feb 27, 2019 in Power BI by Shubham
• 13,490 points
2,843 views
0 votes
1 answer
0 votes
1 answer

How to get month name from month number in Power BI?

You can use: MonthName = FORMAT(DATE(1, [Num], 1), ...READ MORE

answered Sep 24, 2020 in Power BI by Alisha
5,614 views
0 votes
1 answer

How to ignore a slicer for one measure, but apply it on another?

In order to ignore Slicer you need ...READ MORE

answered Oct 1, 2020 in Power BI by Gitika
• 65,910 points
6,400 views
0 votes
1 answer

How do I use the DAX function ParallelPeriod?

The DAX expression you used in the ...READ MORE

answered Oct 5, 2020 in Power BI by Gitika
• 65,910 points
682 views
0 votes
1 answer

How do I count rows in one table based on values in another table using DAX?

If the tables are related, this is ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
21,737 views
0 votes
1 answer

How to calculate PowerBI / DAX - Row wise division by measure?

As for your question, I think you're ...READ MORE

answered Oct 8, 2020 in Power BI by Gitika
• 65,910 points
3,427 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP