Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Good day,
I have the problem for which I cannot find solution, maybe you would be able to support me. I have a data source weekly_movements_data with data from every week and based on Report Date I added Start of Week in Power Query:
Based on this data I counted difference in number of invoices between two last weeks using Below DAX measure:
Comparison of documents = (CALCULATE(DISTINCTCOUNT(weekly_movements_data[Invoice ID]), FILTER(weekly_movements_data, weekly_movements_data[Report Date - Start of Week] = MAX(weekly_movements_data[Report Date - Start of Week])))) - (CALCULATE(DISTINCTCOUNT(weekly_movements_data[Invoice ID]), FILTER(weekly_movements_data, weekly_movements_data[Report Date - Start of Week] = (MAX(weekly_movements_data[Report Date - Start of Week]) - 7))))
I used my DAX measure and Invoice Status to create matrix below:
In the matrix I used the following conditional formatting:
So:
Unfortunately this is correct logic only for two from three Invoice Statuses: for After due date and for Delivered. For status Done I would like to have reverse logic of conditional formatting – above 0 is green, below 0 is red and 0 is amber (like in the matrix below):
Do you come up with any solution? Is it possible to get that result somehow? Thank you all for support!
Hi @PeterAlex ,
It hard to figurt out why it is wrong without some example data.
Can you try this following measure which result is color to conditional formatting.
formatting =
SWITCH (
TRUE (),
[Comparison of documents] < 0, "green",
[Comparison of documents] = 0, "yellow",
"red"
)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
75 | |
53 | |
38 | |
35 |
User | Count |
---|---|
102 | |
84 | |
48 | |
48 | |
48 |