Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Good morning community,
Can anyone help me to make a calculation in PowerBI for this event in the red circle? any advice would be helpful.
Thank you
regards
Poko
Solved! Go to Solution.
@poko , By assuming from current details you have provided you must have an date column
Create a Calculated Column:
Go to the "Modeling" tab in Power BI Desktop.
Click on "New Column".
Proud to be a Super User! |
|
Ensure your dataset includes at least the following columns:
State, Total Number of Leading Cases, Years in Stand
New measure:
CasesMoreThan6Years =
SUMX(
YourTableName,
IF(
YourTableName[YearsInStand] > 6,
YourTableName[TotalNumberOfLeadingCases],
0
)
)
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
Hi @poko ,
You can create a measure as below to get the count of cases which more than 5 years:
Case of which for more than 5 years =
CALCULATE (
DISTINCTCOUNT ( '4CecLeadingCase4'[CecCaseId] ),
FILTER (
'CecCaseDetail',
DATEDIFF ( 'CecCaseDetail'[DefinitiveJudgmentDate], TODAY (), YEAR ) > 5
),
'CecCaseDetail'[Case] = "Stand"
)
Best Regards
Thank you guys for help seems like it works I got difference due to missing dates in columsn but that's another story need to deal with backend guys,developers. Once again Thank you all.
Hello everyone thank you for responses it works someway but I Don't get the result marked in the red circle above.
Hi @poko ,
You can create a measure as below to get the count of cases which more than 5 years:
Case of which for more than 5 years =
CALCULATE (
DISTINCTCOUNT ( '4CecLeadingCase4'[CecCaseId] ),
FILTER (
'CecCaseDetail',
DATEDIFF ( 'CecCaseDetail'[DefinitiveJudgmentDate], TODAY (), YEAR ) > 5
),
'CecCaseDetail'[Case] = "Stand"
)
Best Regards
Ensure your dataset includes at least the following columns:
State, Total Number of Leading Cases, Years in Stand
New measure:
CasesMoreThan6Years =
SUMX(
YourTableName,
IF(
YourTableName[YearsInStand] > 6,
YourTableName[TotalNumberOfLeadingCases],
0
)
)
If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
All columns must be in the same table?
@poko , By assuming from current details you have provided you must have an date column
Create a Calculated Column:
Go to the "Modeling" tab in Power BI Desktop.
Click on "New Column".
Proud to be a Super User! |
|
sure upload pbix??
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
142 | |
72 | |
62 | |
51 | |
48 |
User | Count |
---|---|
206 | |
90 | |
61 | |
59 | |
57 |