replace
5 TopicsCOUNT/COUNTROWS return 0 instead of blank
Hello, I am currently have an issue with count/countrows. When they evaluate and return nothing it shows blank instead of 0. I have 2 tables, a calendar table and a fact table with 10 rows. I am trying to calculate the percentage of colum ORIT = "Y". Lines ORIT2 = var _orit = CALCULATE(COUNTROWS(dataVN),dataVN[ORIT]="Y") return if(ISBLANK(_orit),0,_orit) The result is this. I don't want those extra lines that mean nothing. The manufacturing data field comes from the calendar table. How can I avoid this situation and get the desired result? The .pbix file is in this link if you want to try - https://we.tl/t-bHGwtdUf5d Thank you. AndréSolved11KViews0likes6CommentsFilter and Replace values
Hi guys, I want to filter and replace the SUM of the Distinctcount values when Admin & physical both apply together and replace the total which would be 2 with 1. Please note, this is only an extract of the dataset. I already did the DistinctCount before with this measure: DistinctCountInspectionCategory = DISTINCTCOUNTNOBLANK('Inspections'[Inspection Group]) Sorry I couldn't paste all the values, but the relavent two ID's are included. Thanks for your help. Trip Inspection Id Inspection Group DistinctCountInspectionCategory 9090469 Administrative 1 600384 Administrative 1 600480 Administrative 1 600575 Administrative 1 600671 Administrative 1 600767 Administrative 1 793963 Administrative 1 793997 Administrative 1 794182 Administrative 1 794267 Administrative 1 826837 Administrative 1 829543 Administrative 1 829543 Physical 1 829588 Administrative 1 829588 Physical 1 928621 Administrative 1 928648 Administrative 1 928675 Physical 1 953030 Administrative 1 953104 Physical 1Solved1.3KViews0likes3CommentsReplace blanks after filtering
Hello, I built this measure: RFT_v1_Total = VAR Correct = CALCULATE (SUM ( FactRFTJnJPap[Qty_Correct] ) , DimMeasures[IDMeasureJnJPharma] = 3, DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 }, DATESBETWEEN ( DCalendar[FullDate], EOMONTH ( TODAY (), -12 ), DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) ) ) VAR Total = CALCULATE ( SUM ( FactRFTJnJPap[Qty_Correct] ) + SUM ( FactRFTJnJPap[Qty_Low] ) + SUM ( FactRFTJnJPap[Qty_Moderate] ) + SUM ( FactRFTJnJPap[Qty_Severe] ) , DimMeasures[IDMeasureJnJPharma] = 3, DATESBETWEEN ( DCalendar[FullDate], EOMONTH ( TODAY (), -12 ), DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) ), DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 } ) RETURN DIVIDE ( Correct, Total ) It works great, but now I need to replace the null values with "N/A" after considering the filters ( DimMeasures[IDMeasureJnJPharma] = 3, DATESBETWEEN ( DCalendar[FullDate], EOMONTH ( TODAY (), -12 ), DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 ) ), DimTypeReport[IDTypeReportJnJPharma] IN { 1, 5 }) I've tried a lot of solutions and all that I get was all the null values with "N/A" but ignoring all the filters. What I need is something like this: Thanks in advance for your help. Regards, Ana.922Views0likes2CommentsSubstiute multiple values in a text from another table
Hi, I have this string in a column: A*B*C*A*C Then I have this table: Code Description A Blue B Green C Red D Yellow I would like to create a column where the result picks the description from the table. The result should be like this: Blue*Green*Red*Blue*Red I would really appreciate if you could help me with a dax for this. Thanks!Solved2KViews0likes4CommentsConditional replace and custom column.
Hello good people, I need to create DAX formula to replace sentences with random information into specific words. For example, it will look for words like dehy, hypo, impair from sentences in the strings in a specific column and replace the whole sentence as "injury" into a cutom column. I know that it can be done from custom column option. But I am not sure about the DAX code to do this.825Views0likes1Comment