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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
SpiroswayGR
Resolver III
Resolver III

SnapShot Table with Metrics

Dear Community,

 

FIrst of all, we have Hotel Data with reservations and we would like to create a SnapShot table with some metrics like total revenue , Roomights etc.

 

Secondly,the problem is that each metric has one result (value) for each day. We need to save all of these values for each day on a table with each row = system date (01/01/2020 , 02/01/2020 , 03/01/2020) and then metrics per day.

 

How is that possible either with powerBI or any other way ? 

 

Thank you in advance for your help!!

 

 

1 ACCEPTED SOLUTION

Hi @SpiroswayGR

 

Create a table using an expression as below:

 

Date = CALENDAR(MIN('Table'[System Date]),MAX('Table'[System Date]))

 

Then use a dax expression:

 

Measure = CALCULATE(SUM('Table'[Pax]),FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date])),USERELATIONSHIP('Date'[Date],'Table'[System Date]))
-CALCULATE(SUM('Table'[Pax]),FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date])),USERELATIONSHIP('Date'[Date],'Table'[Cancelation Date]),'Table'[Cancelation Date]<>BLANK())

 

Finally,you will see :

 

Annotation 2020-03-10 182528.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

1) Change the metric join to outer

2)In the grid Data -> VLDB properties -> Query Optimization -> SQL Global optimization -> Level 2 or Level3 ( default will be level 4).

3) In the grid Data -> VLDB Properties -> Query Optimization ->Joins -> Downward Outer Join Option-> Do not downward outer join for a database that supports full outer join.

 

Data set 

 

@Anonymous

@Anonymous 

Screenshot_1.png

 

Hi @SpiroswayGR

 

Create a table using an expression as below:

 

Date = CALENDAR(MIN('Table'[System Date]),MAX('Table'[System Date]))

 

Then use a dax expression:

 

Measure = CALCULATE(SUM('Table'[Pax]),FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date])),USERELATIONSHIP('Date'[Date],'Table'[System Date]))
-CALCULATE(SUM('Table'[Pax]),FILTER(ALL('Date'),'Date'[Date]<=MAX('Date'[Date])),USERELATIONSHIP('Date'[Date],'Table'[Cancelation Date]),'Table'[Cancelation Date]<>BLANK())

 

Finally,you will see :

 

Annotation 2020-03-10 182528.png

 

For the related .pbix file,pls click here.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Anonymous
Not applicable

SImple drag date column in matrix visualization.

And create measure as per your requirements like total revenue , total reservations.

Add drag them in values section.

Final snapshot will be like Total reservations & total revenue per date.

 

Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

 

@Anonymous  This is not working for me cause i want snapshot information ...

For example : On 05/03 System date , i want total revenue from 01/01 to 05/03 , On System Date 07/03 , i want total revenue from 01/101 to 07/03  etc...

 

So all these values per different system saved in a table and visualize them. (It should be like a cumulative chart but it's not cumulative in reality , its a snapshot image for each date)

 

Anonymous
Not applicable

Yes you can create measure as per your requirement.

 

You can do cummulative calculations in power BI.

 

Please share sample date and expected output.

I will provide you exact dax.

 

Thanks & regards,
Pravin Wattamwar
www.linkedin.com/in/pravin-p-wattamwar

If I resolve your problem Mark it as a solution and give kudos.

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.