Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
As shown below, I have numbers going up and down on a daily basis.
I am looking to add in two things here.
If the number is higher or lower than the day before then a green arrow pointing down for lower and red arrow pointing up if higher, and also looking for the value of what either the increase or decrease is.
I can't seem to figure this out with cell elements and simple DAX calculation (that I am still learning) is proving a challenge as well.
Any help would be greatly appreciated.
Something similar to what can be done in Excel is what I am looking for
I was using the Power Query editor in Power BI to make the initial transformations of the table. No Excel was used.
If you click the transform data icon...
what do your text files look like in here?
Proud to be a Super User! | |
With this dataset it is a text files that is added into a folder and refreshed everyday, so any changes in excel would not be possible.
I do think that this is on the right path though, and I have tried to do a countif in BI creating a calculated column.
WRK Count = CALCULATE(FILTER('Daily','Daily'[Ref])
But getting the following error.
And here is some of the data
If I can get this bit to work, then the rest should be pretty straightforward.
There are a few ways to do this.
I started by creating a sample dataset that mimics what you shared.
I would first 'unpivot' this table based on the productID (renaming columns afterwards) to get...
You could use Power Query to get the previous day values, but I will show you in DAX
You can create a calculated column to get the previous day value...
previousDayValue =
var _previousDay =
DATEADD(productValues[Date], -1, DAY)
var _previousDayValue =
LOOKUPVALUE(productValues[currentDayValue], [Date], _previousDay, productValues[productID], productValues[productID])
Return
_previousDayValue
And then create a calculated column that returns the difference between the current day and previous day...
previousDayVariation =
IF(
isblank(productValues[previousDayValue]),
0,
[currentDayValue] - [previousDayValue]
)
I had the formula return 0 if there was no previous day value, you can adjust that as you need.
Now you can create a Matix visual with productID as Rows, Date as Columns and Sum of previousDayValue as Values
You should have something like...
Now you can select the Format Visual->Cell Elements->Icons and turn that on
Making sure that the settings are applied to Sum of previousDayValue
hit the Fx button to edit the conditional formatting
Will get you...
Hope this gets you going in the right direction.
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
56 | |
54 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |