Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

dax

BESTLTGTSale
Abhay ChourasiyaAbhay Chourasiya9.85306377
 Dharmendra  Kherwal81.4843811
 Dinesh  Patil74.4905553
 Rakesh  Admane76.7741134
 Ravindra  Deshmukh70.66465235
 Sandeep  Chouhan106.01192
Amol DalviAmol Dalvi16.15335114
 Muntazir Shakil Ahemad90.03278259
 Rupesh  Raut122.7732161
 Sandeep  Chaudhary87.55578267
 Siddharth  Khobragade126.3647175
Anirudh Singh ChouhanDeepak  Sahu58.61291263
 Santosh  Soni226.0715229
 Satish  Chaturvedi74.0993830
 Shrikant  Dubey119.2013251
 Sourabh  Jaiswal99.55368143
HFS BENilesh  Bhoyar138.146397
 Rahul  Ambulkar96.6750175
Mahendra VyasNew STL Nagda42.5748434
 Rajesh  Pathak109.9209257
 Satyam  Dhamande44.74544254
 Vishnu Tagad100.3021154
ManishManish14.7665681
Manish UpadhyayAnkur  Vaidya140.874697
 DUMMY081
 Manish Upadhyay094
Manoj PanchgamANWAR  SHEIKH154.5587117
 GAURAV  MAHAJAN133.2221231
 Girish  Khirpurkar110.9362235
 Manoj Panchgam6.7061378
 Vishal  Mahajan142.64230
MR NagpurGaurav  Ghotekar185.7865136
 Mitesh  Adatiya91.3218
Rupali DattaNagpur Ecom STL277.002225
Rupali(HFS)Rupali datta34.7160190
Rupali_DattaRupali datta200226
Saurabh ShenadAtul Gatlewar105.7472138
 Pawan  Kakkad85.4146281
 Saurabh  Shenad43.6858215
 Vishnu Patil33.8123275
 Vrushabh Jain87.9606928
Sunil GiramkarDeepika jaiswal500263
 Sunil Giramkar0132
Ujala DeshmukhBhumesh  Nagpure69.17327114
 Ganesh  Chutelkar215.293749
 Kishor  Shinde102.036911
 Nishant  Lanjewar60.2269218
 Shakir  Mohammad73.0443414
 Sumit  Bajaj59.55782116
 Ujala  Deshmukh56.38541219
Viru MoonAlok Jadhav69.62336248
 Mukesh  Pihulkar57.49001213
 Rajesh  Mohare91.2734919
 Sunil  Moon164.1718270
TOTAL 5339.4687927


1)here i have sales vs target and i want to divide sales and target and then convert to percentage.
2)If that percentage is >= 100 then it should return 1 else 0.
3)Also i want to count how many times 1 is being returned.

  • Hi Anonymous 
    If i understood you correctly the measures to use are :
    1.

    % Actual = sumx('Table',DIVIDE([Sale],[TGT]))
    2. 
    flag = if([% Actual]>1,1,0)
    3.
    counter = SUMX(
    SUMMARIZE(VALUES('Table'[STL]),"Counter_1", CALCULATE(COUNTROWS('Table'),FILTER('Table',[flag]=1))),[Counter_1])
     
    Result :

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

  • Anonymous 
    60K is not so huge..if you are using an import mode.
    If the report isn't working with the formula with the virtual table.
    Try to use a calculated column.

    Actual % = divide('Table'[Sale],[TGT])

    and for counting the measure :

    count_2 = CALCULATE(COUNTROWS('Table'),'Table'[Actual %]>1)

    the updated pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

3 Replies

  • Hi Anonymous 
    If i understood you correctly the measures to use are :
    1.

    % Actual = sumx('Table',DIVIDE([Sale],[TGT]))
    2. 
    flag = if([% Actual]>1,1,0)
    3.
    counter = SUMX(
    SUMMARIZE(VALUES('Table'[STL]),"Counter_1", CALCULATE(COUNTROWS('Table'),FILTER('Table',[flag]=1))),[Counter_1])
     
    Result :

    pbix is attached

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hii Ritaf1983 
      I have 60k STL's. And this formula is not working for huge data. 

      • Ritaf1983's avatar
        Ritaf1983
        Super User

        Anonymous 
        60K is not so huge..if you are using an import mode.
        If the report isn't working with the formula with the virtual table.
        Try to use a calculated column.

        Actual % = divide('Table'[Sale],[TGT])

        and for counting the measure :

        count_2 = CALCULATE(COUNTROWS('Table'),'Table'[Actual %]>1)

        the updated pbix is attached

        If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly