Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Thanks & Regards
Shiv
Solved! Go to Solution.
I wasn't quite sure what you wanted as a result (500 on every CQ? or a measure?)
Anyway here's a column:
ColumnX = var _fcst = TableA[FCST]
RETURN
IF (_fcst = "CQ",
CALCULATE(SUM(TableA[REVENUE]),
FILTER(TableA, TableA[WEEK] = 4 && TableA[STAGE] IN {"07", "08"} && TableA[FCST] = _fcst)))
If it's not quite what is required at least you can edit it for desired result
I provided code for a column. I think you are creating a measure. That's OK but you'll need to make some changes.
I wasn't quite sure what you wanted as a result (500 on every CQ? or a measure?)
Anyway here's a column:
ColumnX = var _fcst = TableA[FCST]
RETURN
IF (_fcst = "CQ",
CALCULATE(SUM(TableA[REVENUE]),
FILTER(TableA, TableA[WEEK] = 4 && TableA[STAGE] IN {"07", "08"} && TableA[FCST] = _fcst)))
If it's not quite what is required at least you can edit it for desired result
Hi @HotChilli ,
Thanks for quick response !!
500 should be shown as a card on a page and week 4 is dynamic , which means for current qtr as of now max week data is week 4 hence it is taking as week 4 , in next week max week will become week 5. I want the week to dynamic something max(week_num)
Here is what i have modified to .
I am getting this error
A single value for column 'fcst' in table 'Trend' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
It is showing the error in 1st line after declaring the variable
'Trend'[fcst].
what i am expecting is if the conditions met then whatever value is there in Revenue it should be updated in the new column else 0
if you can take a look and provide me a solution it would a great help please!!
Thanks & Regards
Shiv
1. a measure requires an aggregation (MIN, MAX etc) so it throws the error.
2. The MAX is wrapped round an 'IF' and it needs a column so there's an error.
Maybe post some data (as text) and explain what you are trying to do
Hi @HotChilli ,
Thanks for replying!!
Here is some sample data ,
i am looking fcst should be CQ and stage should be either 07 or 08 and sum (revenue) for max of week in this case where ever it is 4 , so the value should be 500
| FCST | WEEK | STAGE | REVENUE |
| CQ | 1 | 07 | 100 |
| CQ | 4 | 07 | 300 |
| CQ | 4 | 08 | 200 |
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 |
|---|---|
| 9 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |