The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I'm trying to create a measure on DAX that have to subtract 2 measures from a constant (that is 14). The problem is that when I calculate it it duplicates the results row. Here's the formula:
Missed flows = (14 - CALCULATE( DMSFact'[# Not Available] ) )-'DMSFact'[Dealer_TOT_Y]
where
# Not Available and Dealer_TOT_Y are two count measure:
Dealer_TOT_Y =
CALCULATE(COUNT('DMSFact'[Dealer Int])
,'DMSFact'[Dealer Int]="Y"
,GROUPBY('DMSFact','DMSFact'[Dealer Code]))
# Not Available =
CALCULATE(COUNT('DMSFact'[Flag NotAvailable])
,'DMSFact'[Flag NotAvailable]="Y"
)
The result I want to display is the Missed flows for each dealer, in such a form:
Insted I get this:
Solved! Go to Solution.
Hi @MarcoT
Please use
Missed flows =
VAR NotAvilable = [# Not Available]
VAR Dealer = [Dealer_TOT_Y]
RETURN
IF (
NOT ISBLANK ( NotAvilable ) || NOT ISBLANK ( Dealer ),
14 - NotAvilable - Dealer
)
Hi @MarcoT
Please use
Missed flows =
VAR NotAvilable = [# Not Available]
VAR Dealer = [Dealer_TOT_Y]
RETURN
IF (
NOT ISBLANK ( NotAvilable ) || NOT ISBLANK ( Dealer ),
14 - NotAvilable - Dealer
)
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |