Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
kmagat
Regular Visitor

Switching two measures

Hi,

 

I am having a problem in this measure. It says in the report: A table of multiple values was supplied where a single value was expected. So my target is to switch the measures when the invoice months is (Jan,Feb,Mar). The error pop-up when there is no selected month. Is it possible to display it monthly?

Dealer Base (Tenured):= IF(VALUES(DATE_INVOICE[MONTH]) < 4, [Dealer Base Tenured], CALCULATE([Dealer Base1], FACT_OFF_TAKE[DL_CLASSIFICATION] = "TENURED"))

 

SUB METRICS:

Dealer Base1:=CALCULATE(DISTINCTCOUNT(DIM_DEALERS[DEALERS_KEY]), FILTER(DIM_DEALERS,NOT(ISBLANK([Transaction Count DealerBase]))))

Dealer Base OLD:=CALCULATE(DISTINCTCOUNT(DIM_DEALERS[DEALERS_KEY]), FILTER(DIM_DEALERS,NOT(ISBLANK([Transaction Count P4M]))))

Dealer Base Tenured:=CALCULATE([Dealer Base OLD], ALL(FACT_OFF_TAKE[DL_CLASSIFICATION])) - CALCULATE([Dealer Base1], FACT_OFF_TAKE[DL_CLASSIFICATION] = "CURRENT YEAR RECRUITS")

 

1 ACCEPTED SOLUTION
kmagat
Regular Visitor

I have already solve this problem. 
Instead of using values, I used LASTNONBLANK.

IF(LASTNONBLANK(DATE_INVOICE[MONTH], DATE_INVOICE[MONTH] < 4), [Dealer Base Tenured], CALCULATE([Dealer Base1], FACT_OFF_TAKE[DL_CLASSIFICATION] = "TENURED"))

View solution in original post

2 REPLIES 2
kmagat
Regular Visitor

I have already solve this problem. 
Instead of using values, I used LASTNONBLANK.

IF(LASTNONBLANK(DATE_INVOICE[MONTH], DATE_INVOICE[MONTH] < 4), [Dealer Base Tenured], CALCULATE([Dealer Base1], FACT_OFF_TAKE[DL_CLASSIFICATION] = "TENURED"))

Anonymous
Not applicable

if( selectedvalue(date_invoice[month], 100) < 4, ...)

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.