We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I have a table with 3 columns, Customer Number, Account Number & Flag. I want to create a calculated column(NOT A MEASURE) which counts the number of accounts per customer when the flag is set to yes.
CustomerNumber AccountNumber Flag ExpectedOutput Actual Output
1 A1 Y 1 3
1 A2 N 1 3
2 A3 Y 2 3
2 A4 Y 2 3
I am using the following formula
Total Business Investment Products =
CALCULATE (
DISTINCTCOUNTNOBLANK ( 'Fact'[AccountNumber] ),
FILTER ( 'Fact', 'Fact'[Flag] = "Y" ),
ALLEXCEPT ( 'Fact', 'Fact'[CustomerNumber] )
)
Solved! Go to Solution.
Hi,
This calculated column formula works
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[CustomerNumber]=EARLIER(Data[CustomerNumber])&&Data[Flag]="Y"))
Hope this helps.
Hi,
This calculated column formula works
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[CustomerNumber]=EARLIER(Data[CustomerNumber])&&Data[Flag]="Y"))
Hope this helps.
Column = CALCULATE(COUNT(Data[AccountNumber]),ALLEXCEPT(Data,Data[CustomerNumber]),Data[Flag]="Y")
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 |
|---|---|
| 57 | |
| 38 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |