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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Dunner2020
Post Prodigy
Post Prodigy

add up values based on half an hour

Hi there,

 

I have three tables: date, time, and customer information (sample file can be found here https://1drv.ms/u/s!AucycxZHFe9TjS6G96JVtgslQLBX?e=hDipug  ). Data model is shown in the picture:

myasir_0-1595384415267.png

 

I calculated a measure (named Result) using date, time, and customer information table (as shown in the picture).

myasir_1-1595384520914.png

Now I want to create another measure, which summed up the value of the Result measure if it happens in the same half an hour. I tried with groupby but it throws an error. Any help would be really appreciated 

 

 

6 REPLIES 6
amitchandak
Super User
Super User

@Dunner2020 , what us formula not working. I looked at the file. Did not find one with the error. Also, I just removed the time column and just kept half hour only.

@amitchandak Sorry I did not save the file before uploading the file, that's why did not show the error.  I have updated the file.

@Dunner2020 , You do not to aggregate again 

SUMX(VALUES(Times[Half Hour]),[Result])
 
But I think you are looking for all except 
calculate([Result],allexcept(Times[Half Hour]))

@amitchandak , I tried both formulas you mentioned in your last reply.

 

I created a new measure using formula SUMX(VALUES(Times[Half Hour]),[Result]) and also removed the time column but kept half an hour field in the visualisation. However, it did not sum up by half an hour. Results are shown in the picture:

 

measure1.jpg

 

Then I created another measure using this formula   calculate([Result],allexcept(Times,Times[Half Hour]))

 

However, it also produced the same result. Means did not sum up result value based on half an hour.

 

 

 

 

amitchandak
Super User
Super User

Time table is already populated. I couldnt see the reason of creating another one.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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