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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Just see the proudct which has a price change from one day to another

Hi everybody,

 

is it possible to show just the KPIs which changed from one day to another?

An example to make it more clear:

Purchase of Steel:

Price 27.04.2021: 1$ per kg

Price 26.04.2021: 0,90$ per kg

Purchase of wood:

Price 27.04.2021: 0,1$ per kg

Price 26.04.2021: 0,1$ per kg

I would like to see automatically just  the price change of steel in dashboard. Is that in any way possible?

 

Thanks for answers!

Tendo

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @Anonymous ,

 

If you want to campare the product price of the latest two records, try this:

Measure =
VAR LatestDate =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Product] ) )
VAR PreLatestDate =
    CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] < LatestDate )
VAR LatestDatePrice =
    CALCULATE ( SUM ( 'Table'[Price] ), 'Table'[Date] = LatestDate )
VAR PreLatestDatePrice =
    CALCULATE ( SUM ( 'Table'[Price] ), 'Table'[Date] = PreLatestDate )
RETURN
    IF ( LatestDatePrice - PreLatestDatePrice <> 0, SUM ( 'Table'[Price] ) )

price.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Icey
Community Support
Community Support

Hi @Anonymous ,

 

If you want to campare the product price of the latest two records, try this:

Measure =
VAR LatestDate =
    CALCULATE ( MAX ( 'Table'[Date] ), ALLEXCEPT ( 'Table', 'Table'[Product] ) )
VAR PreLatestDate =
    CALCULATE ( MAX ( 'Table'[Date] ), 'Table'[Date] < LatestDate )
VAR LatestDatePrice =
    CALCULATE ( SUM ( 'Table'[Price] ), 'Table'[Date] = LatestDate )
VAR PreLatestDatePrice =
    CALCULATE ( SUM ( 'Table'[Price] ), 'Table'[Date] = PreLatestDate )
RETURN
    IF ( LatestDatePrice - PreLatestDatePrice <> 0, SUM ( 'Table'[Price] ) )

price.PNG

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , Not very clear. Can you share sample data and sample output in table format?

 

You can use date table and time intelligence

 

example

This Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])))
Last Day = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Date]=max('Date'[Date])-1))
Last Day = CALCULATE(sum('order'[Qty]), previousday('Date'[Date]))

diff =[This Day] - [Last Day]

 

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

Anonymous
Not applicable

Hi @amitchandak ,

 

I don´t have an example or data set.

 

Just a question if idea is possible.

 

I try to make it more clear.

If I open my report, i would like to the see just the products which has a price change within a specific time.

For example I open my report on Friday (30.04.2021) I just would like to see the change of steel price not wood, because wood price didn´t change.

 

Hope I could make more clear!

Tendo

@Anonymous , for that we have to do

 

if([diff] = 0 || isblank([diff]) , 1, 0) , you have use this measure with product in visual

 

or

 

count(values(product[product]) , if([diff] = 0 || isblank([diff]) , 1, blank()))

 

 

Now this diff can this day vs last day or last non continuous day

 

Last Day Non Continuous = CALCULATE([sales],filter(ALLSELECTED('Date'),'Date'[Date] =MAXX(FILTER(ALLSELECTED('Date'),'Date'[Date]<max('Date'[Date])),'Date'[Date])))

 

use price measure in place of sales measure

 

Day Intelligence - Last day, last non continous day
https://medium.com/@amitchandak.1978/power-bi-day-intelligence-questions-time-intelligence-5-5-5c3243d1f9

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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