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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
aldopelaez
New Member

Create table From another tables in Power BI with Group by

Hello.
I am a newbie in POwer bi and I have a table in which I have this data
id_peticion, FechaHoraModificacion, h_fase
1                 1/7/2021                          Inicio
1                  2/7/2021                         step1
1                  3/7/2021                        step2
1                  4/7/2021                        Fin
2                  1/7/2021                        Inicio
2                  2/7/2021                        step1
2                 2/7/2021                          step2
2                 3/7/2021                          Fin

And I would need to create another table in power bi with this data from the previous table

id_peticion, apertura cierre
1                1/7/2021 4/7/2021
2               1/7/2021 3/7/2021

The query in SQL would be this but I do not have permissions in the DB to create views or tables so I need to create the table in power bi


select id_peticion, min(FechaHoraModificacion) as apertura, max(FechaHoraModificacion) as cierre
from crmpowerbi
Where (h_fase='Inicio' or h_fase='Fin')
group by id_peticion

Could someone tell me how to do this?
Thanks

1 ACCEPTED SOLUTION
Payeras_BI
Solution Sage
Solution Sage

Hi @aldopelaez ,

Find attached the PBIX file for your reference.

Payeras_BI_1-1627893174467.png

Payeras_BI_0-1627893146971.png

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

2 REPLIES 2
aldopelaez
New Member

Thanks Payeras!!

Payeras_BI
Solution Sage
Solution Sage

Hi @aldopelaez ,

Find attached the PBIX file for your reference.

Payeras_BI_1-1627893174467.png

Payeras_BI_0-1627893146971.png

 

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors