Forum Discussion
Why RANKX doesn't working on decimal value ?
Hi,
When I have these kind of data :
As per picture, I have now some rank which is duplicate (same rank). Altough my rank now "looking" at my column "news count decimal" which is basically have 2 different decimal value if we look at row 1 and 2.
I currently using this DAX :
Before that formula, I also using this :
The result also wrong:
How to get the correct RANK ?
Thanks
VoltesDev Well, you can always just say To **Bleep** with RANKX: To *Bleep* with RANKX! - Microsoft Fabric Community
PBIX is attached below signature.
Rank Provider 4 = VAR __Provider = MAX('table1'[Provider]) VAR __Table = SUMMARIZE( ALLSELECTED('table1'), [provider], "__Value", COUNTROWS(DISTINCT('table1'[title])) + RAND() ) VAR __Value = MAXX( FILTER( __Table, [provider] = __Provider), [__Value]) VAR __Result = COUNTROWS( FILTER( __Table, [__Value] >= __Value) ) RETURN __Result
3 Replies
- Greg_DecklerCommunity Champion
VoltesDev Can't replicate this. See PBIX attached below signature. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.- VoltesDevHelper V
Hi Greg,
How can we attach the file ?
I actually already prepare for the pbix, but seems I cannot upload in here.
The data for sample is like this:
provider title 6abc News News Feed ABC The Latest | US is removing aid pier from Gaza coast again due to weather, officials say ABC Action News Florida News ABC News Political News ABC News Technology News abc13 Watch ABC News Live's 'Pride Across America' featuring nation's largest LGBTQ+ parades, marches abc13 Watch 'Race for the White House' & ABC News' coverage of the CNN Presidential Debate on June 27 ABC30 Action News Watch 'Battle for the White House' & ABC News' coverage of the CNN Presidential Debate on June 27 abp LIVE Breaking News Highlights: CBI Registers FIR In UGC-NET Paper Leak Case, Says Report AdNews Digital News Report: Australia 2024 - At a glance AgWeb Latest From News Al Jazeera English Asia News Al Jazeera English Middle East News Athlon Sports on MSN.com **bleep** Vitale Drops Honest Admission on Latest Caitlin Clark News Athlon Sports on MSN.com Lakers News: Lakers Land Purdue Standout Zach Edey In Latest 2024 NBA Mock Draft Austin American-Statesman OU softball transfer tracker 2024: Latest portal news, roster updates for Sooners Austin American-Statesman York city bridge makes Top 10 list of worst spans in region; the latest on its replacement Australian Broadcasting Corporation AUDIO: ABC News Melbourne Australian Broadcasting Corporation VIDEO: News in 90 Seconds Australian Broadcasting Corporation Weekly news quiz: Peter Dutton's nuclear snack, an irreverent war film, and a freaky-looking fish Barron's Stock Market News: Dow Rises Barron's Stock Market News: Dow Rises After PCE Data Barron's Stock Market News: Dow Set to Open Down Barron's Stock Market News: Dow Wavers BBC BBC News - 10:00 Farage on Putin, JK Rowling on Labour, Gaza - BBC Sounds BBC BBC News - 14:00 Farage on Ukraine, JK Rowling on Labour, Tenerife - BBC Sounds BBC BBC World Service BBC Euro 2024 latest news live: England, Scotland & Mbappe injury updates BBC Latest football news and transfer gossip, plus build-up to Europa Conference League final BBC Latest News BBC South Korea BBC Spain BBC on MSN.com John McGinn news conference - key points BBC on MSN.com Newcastle United news: Anthony Gordon describes bike crash BBC on MSN.com Stephen Nolan ends legal action against The Irish News BBC on MSN.com Steve Clarke news conference - key points Birmingham Mail on MSN.com Met Office, BBC, Sky News break silence over 30C UK heatwave 'next week' Bloomberg on MSN.com Democrats have begun to talk about replacing Biden for the 2024 election. Here’s how that would work—and the hurdles to it happening Business Standard LIVE news: Amit Shah to attend Yoga Day celebrations in Gujarat Business Today on MSN.com Sapphire Foods shares in news as board approves stock split Business Today on MSN.com TCS shares in news today after US court imposes Rs 1,600 crore penalty businesstech.co.za Bad news for coffee lovers in South Africa Cars News & videos Castanet RCMP bomb squad and New West police remove a suspected explosive device CBC.ca City cyber attackers were 'well-funded, organized,' it will take years to recover, experts say CBC.ca Kris Siddiqi takes the news quiz CBS News on MSN.com CBS News price tracker shows how much food, utility and housing costs are rising CBS News on MSN.com George Latimer wins NY-16 primary, CBS News projects, beating incumbent Jamaal Bowman CBS Sports on MSN.com Spain vs. Italy live stream, prediction: Where to watch Euro 2024 online, odds, TV channel, start time, news CBSSports.com 2024 NBA Draft tracker, results, news: Lakers getting a steal, Zach Edey filling a need lead Round 1 takeaways CBSSports.com 2024 NBA Draft trade tracker: Latest news on NBA deals, every traded pick in first, second rounds CBSSports.com 2024 NBA free agency: Ranking top 30 players, tracking latest news as Malik Monk agrees to new Kings deal CBSSports.com Twins get good news on injury front, visit Mariners Centreforaviation.com CAPA News Briefs Channel NewsAsia Singapore CNA is Singapore's most trusted news brand for 6th year in a row: Reuters Institute report Channel NewsAsia Singapore Ukraine's Zelenskyy, Qatari emir discuss how to end war, Qatari news report says Charlotte Observer Duke basketball standout Kyle Filipowski passed over in first round of NBA Draft CoinTelegraph Bitcoin (BTC) Crypto News Today collider Fans of The Hulk Will Be Smashing Their Keyboards at This News collider 'Superman' Set Photos, 'Nosferatu' Trailer, and All The Big Movie News You Missed This Week Columbus Dispatch Oklahoma State softball transfer tracker 2024: Latest portal news, Cowgirls roster updates Couriermail ‘Never seen before’: Sydney’s heartbreaking problem Couriermail Latest sign King Charles refuses to mend bond with Prince Harry CTV News B.C. highway reopened after school bus, pedestrian crashes that killed 1 and sent 14 to hospital CTV News CTV News Windsor’s top stories from this week CTV News Device found in New Westminster found to be explosive; major crime unit takes over CTV News Feels like 40: Heat wave sticking around in Ontario, Quebec, Maritimes CTV News Newfoundland and Labrador getting help from Quebec, Ontario to battle wildfires CTV News Three people facing charges following seizure of drugs, weapon in Kingston, Ont. Cycle News 2024 Dutch MotoGP News and Results (Updated) Daily Express Susanna Reid halts Good Morning Britain for breaking news announcement Daily Express on MSN.com Royal Family: Prince Harry issued blunt warning as Firm is 'united' despite 'attacks' Daily Mail BREAKING NEWSLiverpool confirm club legend Alan Hansen has been DISCHARGED from hospital Daily Mail BREAKING NEWSPolice searching for missing former colleague of MoneySavingExpert Martin Lewis find body Daily Mail Donald Trump Daily Mail Football Transfer News - Latest News and Updates Daily Mail Georgia 0-0 Czechia - Euro 2024: Live score, team news and updates as Napoli's Khvicha Kvaratskhelia starts for Georgians, while West Ham duo Vladimir Coufal and Tomas Soucek ... Daily Mail Poland vs Austria - Euro 2024: Live score, team news and updates as the 74,000 capacity stadium plays host to crunch Daily Mail World News The "News count" is measure by using this :
News count = DISTINCTCOUNTNOBLANK('table1'[title])and the News count with decimal :News count decimal =VAR _random = RAND()RETURN[News count] + _randomand rank using those in my original thread.Thanks.- Greg_DecklerCommunity Champion
VoltesDev Well, you can always just say To **Bleep** with RANKX: To *Bleep* with RANKX! - Microsoft Fabric Community
PBIX is attached below signature.
Rank Provider 4 = VAR __Provider = MAX('table1'[Provider]) VAR __Table = SUMMARIZE( ALLSELECTED('table1'), [provider], "__Value", COUNTROWS(DISTINCT('table1'[title])) + RAND() ) VAR __Value = MAXX( FILTER( __Table, [provider] = __Provider), [__Value]) VAR __Result = COUNTROWS( FILTER( __Table, [__Value] >= __Value) ) RETURN __Result