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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Calculated colum

Hi all,

 

I have a question for this DB:

https://www.dropbox.com/s/m8hywr41rn6neq8/example.xlsx?dl=0

 

I wold have a table:

- grouped by Rimorchio: a list of all the contents

- Grouped by Trasportatore

- 3 fileds: Check in, check out, tot

1) checkin= the tot of the nr of Checkin from the field "senza titolo", for each index of "Rimorchio"

2) checkout = the tot of the nr of Checkout from the field "senza titolo", for each index of "Rimorchio"

3) tot= the difference between checkout and checkin

 

Do u have any idea to solve it?

Thanks for your help

1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@Anonymous 

Hope I understood your request correctly.

create a table

Table = ADDCOLUMNS( SUMMARIZE('Foglio1','Foglio1'[RIMORCHIO],"checkin",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKIN")),"checkout",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKOUT"))),"tot",[checkout]-[checkin])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

4 REPLIES 4
ryan_mayu
Super User
Super User

@Anonymous 

Hope I understood your request correctly.

create a table

Table = ADDCOLUMNS( SUMMARIZE('Foglio1','Foglio1'[RIMORCHIO],"checkin",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKIN")),"checkout",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKOUT"))),"tot",[checkout]-[checkin])

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Hi Ryan

 

it works!

thanks a lot

a last question:

how can I had a column to have the greater date relative at the check in?

@Anonymous 

do you want to add the latest checkin date to the new table?

Table = ADDCOLUMNS( SUMMARIZE('Foglio1','Foglio1'[RIMORCHIO],"checkin",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKIN")),"checkout",CALCULATE(countrows(Foglio1),FILTER('Foglio1',Foglio1[Senza Titolo]="CHECKOUT")),"maxcheckindate",CALCULATE(max('Foglio1'[Data della registrazione]),ALLEXCEPT('Foglio1',Foglio1[RIMORCHIO]))),"tot",[checkout]-[checkin])

 1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




VijayP
Super User
Super User

@Anonymous 

If I have understood your question , please let me know do you want this information shown in the belwo pic?

Vijay Perepa

 

2020-08-16_211401.png




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors