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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Raggsokk
Frequent Visitor

Weekly RVtools report - add colour

I find many post on how to add colour to reports, but I can't really wrap my head around it on how I can do it in my dataset.
Hopefully someone can point me in the right directions.

I have made a weekly report that adds many rvtools reports into the dataset.
The table ends up something like this.

 

SourceServerRamGBDate
rvtools-week1Server187/1-23
rvtools-week2Server1814/1-23
rvtools-week3Server11221/1-23


How can I add colour to my report. If RamGB is higher from last week, I would like the number to show up as green. If it is lower, red.
report.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @Raggsokk ,

 

Here are the steps you can follow:

1. Create measure.

 

Flag =
var _select=
SELECTEDVALUE('Table'[Date])
var _current=
SUMX(
    FILTER(ALL('Table'),
    WEEKNUM(_select,2)=WEEKNUM('Table'[Date],2)&&'Table'[Server]=MAX('Table'[Server])),[RamGB])
var _last=
SUMX(
    FILTER(ALL('Table'),
    WEEKNUM(_select,2)-1=WEEKNUM('Table'[Date],2)&&'Table'[Server]=MAX('Table'[Server])),[RamGB])
return
SWITCH(
    TRUE(),
        _last>_current,"red",
        _last=_current,"yellow",
        "blue")

 

2. Conditional formatting – Background color.

vyangliumsft_0-1678674634111.png

vyangliumsft_1-1678674634114.png

3. Result:

vyangliumsft_0-1678674721155.png

 

Best Regards,

Liu Yang

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

3 REPLIES 3
Anonymous
Not applicable

Hi  @Raggsokk ,

 

Here are the steps you can follow:

1. Create measure.

 

Flag =
var _select=
SELECTEDVALUE('Table'[Date])
var _current=
SUMX(
    FILTER(ALL('Table'),
    WEEKNUM(_select,2)=WEEKNUM('Table'[Date],2)&&'Table'[Server]=MAX('Table'[Server])),[RamGB])
var _last=
SUMX(
    FILTER(ALL('Table'),
    WEEKNUM(_select,2)-1=WEEKNUM('Table'[Date],2)&&'Table'[Server]=MAX('Table'[Server])),[RamGB])
return
SWITCH(
    TRUE(),
        _last>_current,"red",
        _last=_current,"yellow",
        "blue")

 

2. Conditional formatting – Background color.

vyangliumsft_0-1678674634111.png

vyangliumsft_1-1678674634114.png

3. Result:

vyangliumsft_0-1678674721155.png

 

Best Regards,

Liu Yang

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

Hi, Are you using the fabric to import the data from rvtools? or is there a template or something?

 

Care to share?

 

Thank you

We have a PowerShell script that runs on a schedule each week.

I then merge all files in the same folder in powerbi.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.