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
671 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,890 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,525 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,890 points
4,843 views
0 votes
1 answer

How do I download or have my Power BI Data Analyst certificate sent to my email?

To download your Power BI Data Analyst ...READ MORE

answered Oct 24 in Power BI by pooja
• 1,220 points
41 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,540 points
1,112 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
6,226 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,890 points
6,793 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,890 points
890 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,890 points
22,556 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,890 points
3,819 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