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.
Hello,
I want to provide a comparison of sales value as of each date.
Example:
Report Date | Contracts Value |
16/06/2021 | 10500 |
20/06/2021 | 13100 |
29/06/2021 | 9800 |
...etc | ...etc |
The user will select two dates to compare (for example he will select 16/06/2021 & 20/06/2021). Note that there are also columns showing contract #, customer name, etc. In the table below - to keep it simple - I showed the aggregated values.
I have created a measure below:
New Contracts Financial Reporting =
VAR _minDate = min(Portfolio[Report Date])
VAR _maxDate = max(Portfolio[Report Date])
VAR _minDateValue = calculate([Annualized Value],Portfolio[Report Date]=_minDate)
VAR _maxDateValue = calculate([Annualized Value],Portfolio[Report Date]=_maxDate)
RETURN
_maxDateValue-_minDateValue
This measure works fine with a bar chart with Customer Name on the Axis and above measure as values. I have created two bar charts like this.
The first one is filtered (filter pane) with the condition "New Contracts Financial Reporting is less than 0", the other one is filtered with "New Contracts Financial Reporting is greater than 0".
So I have the evolution between two dates selected by user broken down by customer (I can see where contract/sales value has been increased and decreased).
What I would also like to get is a summary in CARD visuals. Similar to bar charts, the first card should show the sum of increased contracts/sales and the second card should show the sum of decreased contracts. I cannot apply the same filter on the measure as I did on the bar chart.
I believe I would need to create a new measure, can someone help with this?
Solved! Go to Solution.
[Positive Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MAX(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
[Negative Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MIN(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
Hi @Anonymous ,
You can use the following two measures for two cards:
increased contracts = SUMX(FILTER( SUMMARIZE(FactTable,FactTable[CustomerID],"_increasedvalue",[New Contracts Financial Reporting]),[_increasedvalue]>=0),[_increasedvalue])
Decreased contracts = SUMX(FILTER( SUMMARIZE(FactTable,FactTable[CustomerID],"_decreasedvalue",[New Contracts Financial Reporting]),[_decreasedvalue]<=0),[_decreasedvalue])
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
[Positive Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MAX(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
[Negative Diffs Total] =
SUMX(
SUMMARIZE(
FactTable,
// This CustomerID must be
// unique. It's the key to
// the Customer dimension.
Customers[CustomerID]
),
MIN(
// blank is treated as 0
// but will not display
BLANK(),
[New Contracts Financial Reporting]
)
)
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 |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
42 | |
40 |