cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

unable to call the source column without using aggregate functions in measure

unable to call the source column without using aggregate functions in measure...

 

im creating measure and i dont want to use SUM or aggregate functions for MRP_AVAIL_USD_AMT column in measure...

 

thimmaraju_0-1626763249230.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , measure mean aggregated value, so you have to some operation like sum , min or max on MRP_AVAIL_USD_AMT 

 

If needed you can create a new column. Only if test is not a measure

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , measure mean aggregated value, so you have to some operation like sum , min or max on MRP_AVAIL_USD_AMT 

 

If needed you can create a new column. Only if test is not a measure

Anonymous
Not applicable

Yes @Amit

 

you are correct..but if i use calculated column then slicer selection filter calculations will not apply 

 

but if i use measure then slicer selection will apply on measure only...below is the dax which im using 

 

MRP_AVAIL_USD_AMT_SINGLE_mea =
// var maxCol =
// CALCULATE(MAX(AZSAT_SHPMT_INVEN_WKLY_VW[Index]), ALLEXCEPT(AZSAT_SHPMT_INVEN_WKLY_VW,AZSAT_SHPMT_INVEN_WKLY_VW[SFU_MATL_ID],AZSAT_SHPMT_INVEN_WKLY_VW[FPC_ID],AZSAT_SHPMT_INVEN_WKLY_VW[fy_mth_id]) )

var test =

CALCULATE(
MAX(
AZSAT_SHPMT_INVEN_WKLY_VW[Index]
),
ALLEXCEPT(
AZSAT_SHPMT_INVEN_WKLY_VW,
AZSAT_SHPMT_INVEN_WKLY_VW[SFU_MATL_ID], AZSAT_SHPMT_INVEN_WKLY_VW[FPC_ID], AZSAT_SHPMT_INVEN_WKLY_VW[fy_mth_id]
),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[BRAND_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CUST_LVL_4_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[SUB_TRADE_CHANL_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_1_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_2_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_3_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_4_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_5_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_6_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_7_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[ATTR_8_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[PROFT_CTR_LVL_5_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[LOCAL_DFU_STTUS_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[LOCAL_MATL_STTUS_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CATEG_NAME]),
FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[CSU_IND])
,FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[Geolevel_sl]),

FILTERS('distinct subsector'[Subsector]),

FILTERS(AZSAT_SHPMT_INVEN_WKLY_VW[SelectedMarket])
)

return if(test= MAX(AZSAT_SHPMT_INVEN_WKLY_VW[Index]),SUM(AZSAT_SHPMT_INVEN_WKLY_VW[MRP_AVAIL_USD_AMT]))
 

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors
Top Kudoed Authors