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
GarethParry
Helper I
Helper I

Week on Week difference in Graph

Hi,

 

Every week i get the current meter readings for a printer. The figures are cumulative. I want to work out how much is used each week.

I have created a measure which works perfectly in a table. Example for color copies used

colorprintdiff = SUM(t_print_monitor[colorPrint]) - CALCULATE(SUM(t_print_monitor[colorPrint]),FILTER(ALL(t_print_monitor),t_print_monitor[site] = MAX(t_print_monitor[site]) && t_print_monitor[deptId] = MAX(t_print_monitor[deptId])  && t_print_monitor[week] = MAX(t_print_monitor[week]) -1))

i want to show the week on week useage in a graph, but when i add the measure it jsut shows the cumulative figure.

is there a way of doing this?

 

thanks

Gareth

8 REPLIES 8
FREDPI
Frequent Visitor

Hey, 

Best to work with a different data table.  A create a relationship. But it is possible with the same one

Like @Uzi2019  says, can you maybe share the datamodel 🙂




this is my test file 

FREDPI_0-1698232924380.png

FREDPI_1-1698233131339.png

 
MinConsumption = min(Sheet1[consumption])
MaxConsumption = MAX(Sheet1[consumption])
DiffConsumption = [MaxConsumption] - [MinConsumption]
 

Indeed should be min, was a bit to fast in ctrl+c/ctrl+v 

Uzi2019
Super User
Super User

hi @GarethParry 

can you share the sample data with expected output in excel.

It would be easier to understand your data model and your expected output.


Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Hi,

 

Slightly silly question, but how do i uplaod my excel file on here?

 

thanks

 

Gareth

Hi @GarethParry 
you can share google drive public link or paste the excel data directly here.

 

just share the screenshot of your data like this 

 

Uzi2019_0-1698235024030.png

 

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

did this help?

Hi

 

Data is

 

GarethParry_0-1698237488048.png

looking for graphs like (x axis is userid)

GarethParry_1-1698237569108.png

thanks

 

Gareth

 

 

FREDPI
Frequent Visitor

Do you have a data table in your model?

I would suggets you add a datatable where weeks are attributes of that table.

 

After that I would create a measures

 

1) TotalPrinterMAX = MAX(t_Print_monitor[ColorPrint])

2) TotalPrinterMin= MAX(t_Print_monitor[ColorPrint])
3) PrinterColorUsed = TotalPrinterMAX - TotalPrinterMin

if you put on the x-axis the Week and on the Y-axis the PrintercolorUsed, you should get the desired result

Hi,

Hi,

 

Thanks for replying.

 

i already have the week number in the dataset. do you mean add a table that just has all the week numbers and create a connection between this and my dataset?

 

should 2) be MIN(t_Print_monitor[ColorPrint])?

thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.