Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hi all,
I'm trying to create a measure where 'Current CDP - Total' column is summed with the following conditions:
- If OOS column is blank, sum the whole column regardless of month
- If OOS column is not blank, sum the whole column but exclude next 3 months i.e. where N3M is not blank
I'm trying to use this N3M column because I don't want the date to be dynamic by using today() function. I've been trying to use calculate but getting stuck. For context, SKU level is the lowest granularity but the measure needs to also apply at an aggregated level i.e. for region.
Hope this makes sense and someone can kindly explain how to do this.
Data Tables - M Dates for N3M
Raw data for Current CDP
Try this
Totalvalue =
CALCULATE(
SUM(yourtable[yourvalue]),
ALLEXPEPT(yourtable, yourtable[Region],yourtable[Sku]
)
Totalvalue3m =
CALCULATE(
SUM(yourtable[yourvalue]),
ALLEXPEPT(yourtable, yourtable[Region],yourtable[Sku],
ISBLANK(yourtable[N3M])y
)
Your answer =
IF (
ISBLANK( SELECT(yourtable[OOS]) ),
Totalvalue3M,
Totalvalue)
Please cleick thumbs up and accept as solution. Thanks 😀
Hi,
thanks for this however it is not quite working - rather than removing current CDP values for only N3M, it is not populating it at all. Please see screenshot below.
Note I did not use the all except part - apologies I didn't make it clear in the original post. I want users to be able to adjust granularity for all report measure i.e. region, brand, category, sub category etc. so I believe I don't need this part?
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 38 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 68 | |
| 34 | |
| 33 | |
| 30 |